X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_gate.c;fp=world_gate.c;h=bb62e341aab99085071a9edc55d08ba6da73fc57;hb=074fa69f479724f9800849430bad5caf730b01ef;hp=b236bc9bd1f3934c2a180edc44099f73dc3c79bd;hpb=9385ff1868a052d92d60c0b49aa03848460b1916;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_gate.c b/world_gate.c index b236bc9..bb62e34 100644 --- a/world_gate.c +++ b/world_gate.c @@ -16,6 +16,7 @@ #include "camera.h" #include "world_water.h" +#include "player_remote.h" /* * Update the transform matrices for gate @@ -196,6 +197,7 @@ static int render_gate( world_instance *world, world_instance *world_inside, glDisable( GL_STENCIL_TEST ); } + render_remote_players( world_inside, &world_gates.cam ); return 1; } @@ -247,8 +249,7 @@ static int gate_intersect_plane( ent_gate *gate, /* * Intersect specific gate */ -static int gate_intersect( ent_gate *gate, v3f pos, v3f last ) -{ +static int gate_intersect( ent_gate *gate, v3f pos, v3f last ){ v2f xy; if( gate_intersect_plane( gate, pos, last, xy ) ){ @@ -264,26 +265,22 @@ static int gate_intersect( ent_gate *gate, v3f pos, v3f last ) /* * Intersect all gates in the world */ -static ent_gate *world_intersect_gates( world_instance *world, - v3f pos, v3f last ){ +static u32 world_intersect_gates( world_instance *world, v3f pos, v3f last ){ for( u32 i=0; ient_gate); i++ ){ ent_gate *gate = mdl_arritm( &world->ent_gate, i ); if( !(gate->flags & k_ent_gate_linked) ) continue; if( gate->flags & k_ent_gate_locked ) continue; - if( gate->flags & k_ent_gate_nonlocal ){ - if( world_static.load_state != k_world_loader_none ){ + if( gate->flags & k_ent_gate_nonlocal ) + if( world_static.load_state != k_world_loader_none ) continue; - } - } - if( gate_intersect( gate, pos, last ) ){ - return gate; - } + if( gate_intersect( gate, pos, last ) ) + return mdl_entity_id( k_ent_gate, i ); } - return NULL; + return 0; } /*