fixed so that the local player is always rendered above the other players

This commit is contained in:
Magnus Auvinen 2009-01-11 17:55:23 +00:00
parent accc4799ed
commit b717297b63

View file

@ -458,6 +458,9 @@ void PLAYERS::render_player(
}
void PLAYERS::on_render()
{
// render other players in two passes, first pass we render the other, second pass we render our self
for(int p = 0; p < 2; p++)
{
for(int i = 0; i < MAX_CLIENTS; i++)
{
@ -470,6 +473,11 @@ void PLAYERS::on_render()
if(prev_info && info)
{
//
bool local = ((const NETOBJ_PLAYER_INFO *)info)->local !=0;
if(p == 0 && local) continue;
if(p == 1 && !local) continue;
NETOBJ_CHARACTER prev_char = gameclient.snap.characters[i].prev;
NETOBJ_CHARACTER cur_char = gameclient.snap.characters[i].cur;
@ -482,3 +490,4 @@ void PLAYERS::on_render()
}
}
}
}