build system revision
[carveJwlIkooP6JGAAIwe30JlM.git] / world_routes.c
index b0af9048525e40b15f6bfdb5c44af64d25fa714e..4ee50d8cb42539e32c4792818ff31065cd0685fb 100644 (file)
@@ -1,10 +1,11 @@
+#pragma once
+
 /*
- * Copyright (C) 2021-2023 Mt.ZERO Software, Harry Godden - All Rights Reserved
+ * Copyright (C) 2021-2024 Mt.ZERO Software - All Rights Reserved
+ *
+ * World routes
  */
 
-#ifndef ROUTES_C
-#define ROUTES_C
-
 #include <time.h>
 #include "entity.h"
 #include "world_routes.h"
@@ -21,6 +22,7 @@
 #include "shaders/scene_route.h"
 #include "shaders/routeui.h"
 #include "ent_region.h"
+#include "scene_rigidbody.h"
 
 static void world_routes_clear( world_instance *world )
 {
@@ -697,7 +699,8 @@ static void world_routes_fixedupdate( world_instance *world ){
       }
    }
 
-   rb_presolve_contacts( rb_contact_buffer, rb_contact_count );
+   rb_presolve_contacts( rb_contact_buffer, 
+                         vg.time_fixed_delta, rb_contact_count );
 
    for( int i=0; i<rb_contact_count; i++ ){
       rb_contact_restitution( rb_contact_buffer+i, vg_randf64(&vg.rand) );
@@ -1082,5 +1085,3 @@ static void render_world_routes( world_instance *world,
    glEnable( GL_CULL_FACE );
    glDrawBuffers( 2, (GLenum[]){ GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 } );
 }
-
-#endif /* ROUTES_C */