X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player.c;h=78449ad1e04b2a80338948ccff385cccc4df7abb;hb=e75926c89391d28ea586362158767daaa876c759;hp=c478305a4d27a4ee974f467b583aff871e893623;hpb=730f202673d6ceb2a5199cf244d5c0bddc064fcf;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player.c b/player.c index c478305..78449ad 100644 --- a/player.c +++ b/player.c @@ -114,9 +114,17 @@ static void player__post_update(void){ /* * Applies gate transport to a player_interface */ -static void player__pass_gate( ent_gate *gate ){ - world_routes_fracture( world_current_instance(), gate, - localplayer.rb.co, localplayer.rb.v ); +static void player__pass_gate( u32 id ){ + world_instance *world = world_current_instance(); + + /* update boundary hash (network animation) */ + u16 index = mdl_entity_id_id(id) & ~NETMSG_BOUNDARY_MASK; + localplayer.boundary_hash ^= NETMSG_GATE_BOUNDARY_BIT; + localplayer.boundary_hash &= ~NETMSG_BOUNDARY_MASK; + localplayer.boundary_hash |= index; + + ent_gate *gate = mdl_arritm( &world->ent_gate, mdl_entity_id_id(id) ); + world_routes_fracture( world, gate, localplayer.rb.co, localplayer.rb.v ); localplayer.gate_waiting = gate; world_routes_activate_entry_gate( world_current_instance(), gate ); @@ -246,6 +254,8 @@ static void player__spawn( ent_spawn *rp ){ if( player_subsystems[ localplayer.subsystem ]->reset ) player_subsystems[ localplayer.subsystem ]->reset( rp ); + + localplayer.boundary_hash ^= NETMSG_BOUNDARY_BIT; }