network items, interp boundaries
[carveJwlIkooP6JGAAIwe30JlM.git] / player_skate.c
index dbf927b0416ec8df4ab253810a0f244c5fef4102..f8b41660955128441b76d9badc5284f7a6cb6d6c 100644 (file)
@@ -2524,10 +2524,11 @@ begin_collision:;
    skate_integrate();
    vg_line_point( state->cog, 0.02f, VG__WHITE );
 
-   ent_gate *gate = 
-      world_intersect_gates(world, localplayer.rb.co, state->prev_pos );
+   u32 id = world_intersect_gates( world, localplayer.rb.co, state->prev_pos );
+
+   if( id ){
+      ent_gate *gate = mdl_arritm( &world->ent_gate, mdl_entity_id_id(id) );
 
-   if( gate ){
       m4x3_mulv( gate->transport, localplayer.rb.co, localplayer.rb.co );
       m3x3_mulv( gate->transport, localplayer.rb.v,  localplayer.rb.v );
       m4x3_mulv( gate->transport, state->cog,   state->cog );
@@ -2543,7 +2544,7 @@ begin_collision:;
       q_mul( transport_rotation, state->smoothed_rotation,
                                  state->smoothed_rotation );
       rb_update_transform( &localplayer.rb );
-      player__pass_gate( gate );
+      player__pass_gate( id );
    }
 
    /* FIXME: Rate limit */