mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 12:32:13 +00:00
- Duke: Clean up player/actor accesses in PlayerColorChanged()
.
This commit is contained in:
parent
50acc673c9
commit
2ff4aaf6b8
1 changed files with 9 additions and 4 deletions
|
@ -59,17 +59,22 @@ void PlayerColorChanged(void)
|
||||||
if (ud.recstat != 0)
|
if (ud.recstat != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto pp = getPlayer(myconnectindex);
|
const auto p = getPlayer(myconnectindex);
|
||||||
|
const auto pact = p->GetActor();
|
||||||
|
|
||||||
if (ud.multimode > 1)
|
if (ud.multimode > 1)
|
||||||
{
|
{
|
||||||
//Net_SendClientInfo();
|
//Net_SendClientInfo();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pp->palookup = ud.user_pals[myconnectindex] = playercolor2lookup(playercolor);
|
p->palookup = ud.user_pals[myconnectindex] = playercolor2lookup(playercolor);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pact && pact->spr.pal != 1)
|
||||||
|
{
|
||||||
|
pact->spr.pal = ud.user_pals[myconnectindex];
|
||||||
}
|
}
|
||||||
if (pp->GetActor()->isPlayer() && pp->GetActor()->spr.pal != 1)
|
|
||||||
pp->GetActor()->spr.pal = ud.user_pals[myconnectindex];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue