stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / world.h
diff --git a/world.h b/world.h
index ea5a5c4b7ec71408b6cd92da2fc545eaa302e8bc..73b42a4c2bbaf45de4a41f5295bf7789f4e5e028 100644 (file)
--- a/world.h
+++ b/world.h
@@ -1,9 +1,10 @@
+#include "common.h"
+
+static int ray_world( v3f pos, v3f dir, ray_hit *hit );
+
 #ifndef WORLD_H
 #define WORLD_H
 
-#define VG_3D
-#include "vg/vg.h"
-
 #include "scene.h"
 #include "terrain.h"
 #include "render.h"
@@ -22,10 +23,6 @@ static struct gworld
 
    v3f tutorial;
 
-#if 0
-   rigidbody box;
-#endif
-
    teleport_gate gates[16];
    u32 gate_count;
    
@@ -69,7 +66,6 @@ static int ray_hit_is_ramp( ray_hit *hit )
    return hit->tri[0] < world.sm_road.vertex_count;
 }
 
-static bh_system bh_system_rigidbodies;
 static void world_load(void)
 {
    /* Setup scene */
@@ -207,7 +203,7 @@ static void world_load(void)
       if( ray_world( pos, (v3f){0.0f,-1.0f,0.0f}, &hit ))
       {
          if( hit.normal[1] > 0.8f && !ray_hit_is_ramp(&hit) &&
-             hit.pos[1] > wrender.height )
+             hit.pos[1] > water_height()+10.0f )
          {
             v4f qsurface, qrandom;
             v3f axis;
@@ -222,7 +218,7 @@ static void world_load(void)
 
             v3_copy( hit.pos, transform[3] );
             
-            if( vg_randf() < 0.00000006f )
+            if( vg_randf() < 0.0006f )
             {
                m3x3_identity( transform );
                scene_add_foliage( &world.foliage, mfoliage, sm_tree, transform);