commit a4dfd4026db9e82618357b40643214035d4d18ac parent bca8217d25c814ac61d03c40ced56161569875fd Author: Michael Savage <mikejsavage@gmail.com> Date: Wed Dec 28 20:42:06 +0200 Don't draw a box for yourself, draw fatter boxes for everyone else Diffstat:
hm.cc | | | 12 | ++++++++---- |
diff --git a/hm.cc b/hm.cc @@ -171,6 +171,7 @@ struct Explosion { }; struct Player { + u64 sid; v3 pos; }; @@ -328,7 +329,7 @@ extern "C" GAME_FRAME( game_frame ) { ReadStreamCheckpoint rsc = rs.checkpoint(); for( u16 i = 0; i < player_count; i++ ) { - u64 s = read_u64( &rs ); + read_u64( &rs ); v3 pos; read( &rs, &pos ); } @@ -345,6 +346,7 @@ extern "C" GAME_FRAME( game_frame ) { player = players.acquire(); ASSERT( player != NULL ); // TODO sid_to_player.add( s, player ); + player->sid = s; } player->pos = pos; @@ -358,9 +360,11 @@ extern "C" GAME_FRAME( game_frame ) { immediate_init( &imm, boxes, ARRAY_COUNT( boxes ) ); for( const Player * player : players ) { - v3 mins = player->pos - v3( 0.1, 0.1, 1.8 ); - v3 maxs = player->pos + v3( 0.1, 0.1, 0 ); - immediate_aabb( &imm, mins, maxs, v4( 1, 1, 0, 1 ) ); + if( player->sid != sid ) { + v3 mins = player->pos - v3( 0.4, 0.4, 1.8 ); + v3 maxs = player->pos + v3( 0.4, 0.4, 0.1 ); + immediate_aabb( &imm, mins, maxs, v4( 1, 1, 0, 1 ) ); + } } m4 VP = V * P;