Use IsDisplayPlayer for more things

Makes viewpoints in spectating/demos do client-side effects a little better
This commit is contained in:
TehRealSalt 2019-05-10 15:28:39 -04:00
parent 7913938427
commit 41a66ac50a
3 changed files with 4 additions and 4 deletions

View file

@ -6702,7 +6702,7 @@ void P_MobjThinker(mobj_t *mobj)
if ((G_RaceGametype() || mobj->target->player->kartstuff[k_bumper] <= 0)
#if 1 // Set to 0 to test without needing to host
|| ((mobj->target->player == &players[displayplayers[0]]) || P_IsLocalPlayer(mobj->target->player))
|| (P_IsDisplayPlayer(mobj->target->player))
#endif
)
mobj->flags2 |= MF2_DONTDRAW;

View file

@ -4242,7 +4242,7 @@ DoneSection2:
player->starpostangle = player->starpostx = player->starposty = player->starpostz = player->kartstuff[k_starpostflip] = 0;
}
if (P_IsLocalPlayer(player))
if (P_IsDisplayPlayer(player))
{
if (player->laps == (UINT8)(cv_numlaps.value - 1))
S_StartSound(NULL, sfx_s3k68);
@ -4272,7 +4272,7 @@ DoneSection2:
if (player->laps >= (unsigned)cv_numlaps.value)
{
if (P_IsLocalPlayer(player))
if (P_IsDisplayPlayer(player))
S_StartSound(NULL, sfx_s3k6a);
else if (player->kartstuff[k_position] == 1)
S_StartSound(NULL, sfx_s253);

View file

@ -1674,7 +1674,7 @@ void P_DoPlayerExit(player_t *player)
if (cv_kartvoices.value)
{
if (P_IsLocalPlayer(player))
if (P_IsDisplayPlayer(player))
{
sfxenum_t sfx_id;
if (K_IsPlayerLosing(player))