build system revision
[carveJwlIkooP6JGAAIwe30JlM.git] / testing.c
index 2e581637e017e040f12b6fda8ec9c3c7e58b7f55..a71806ccab935a1eba73743b41dce46ea0243455 100644 (file)
--- a/testing.c
+++ b/testing.c
@@ -1,6 +1,7 @@
 #pragma once
 #include "vg/vg_m.h"
 #include "vg/vg_rigidbody.h"
+#include "vg/vg_input.h"
 #include "scene_rigidbody.h"
 
 struct {
@@ -14,6 +15,9 @@ static baller = {
 };
 
 static void testing_update(void){
+   if( !vg_console.cheats )
+      return;
+
    if( vg_getkey( SDLK_9 ) ){
       v3_add( localplayer.rb.co, (v3f){0,1,0}, baller.rb.co );
       v3_zero( baller.rb.w );
@@ -46,7 +50,8 @@ static void testing_update(void){
       buf[j].rbb = &_null;
    }
 
-   rb_presolve_contacts( rb_contact_buffer, rb_contact_count );
+   rb_presolve_contacts( rb_contact_buffer, 
+                         vg.time_fixed_delta, rb_contact_count );
 
    for( u32 i=0; i<8; i ++ )
       rb_solve_contacts( rb_contact_buffer, rb_contact_count );