mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Emblem system, Spray Cans: prevent Exiting players from grabbing them
Fixes an issue that as far as the author of this commit is aware was only reported on Discord
This commit is contained in:
parent
14b6c0f275
commit
66c415ea41
2 changed files with 19 additions and 4 deletions
|
|
@ -201,10 +201,19 @@ boolean P_CanPickupEmblem(player_t *player, INT32 emblemID)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (player->bot)
|
||||
if (player != NULL)
|
||||
{
|
||||
// Your nefarious opponent puppy can't grab these for you.
|
||||
return false;
|
||||
if (player->bot)
|
||||
{
|
||||
// Your nefarious opponent puppy can't grab these for you.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player->exiting)
|
||||
{
|
||||
// Yeah but YOU didn't actually do it now did you
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -680,6 +689,12 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
return;
|
||||
}
|
||||
|
||||
if (player->exiting)
|
||||
{
|
||||
// Yeah but YOU didn't actually do it now did you
|
||||
return;
|
||||
}
|
||||
|
||||
if (!P_IsLocalPlayer(player))
|
||||
{
|
||||
// Must be party.
|
||||
|
|
|
|||
|
|
@ -7230,7 +7230,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
mobj->frame &= ~FF_TRANSMASK;
|
||||
mobj->renderflags &= ~RF_TRANSMASK;
|
||||
|
||||
if (P_EmblemWasCollected(mobj->health - 1) || !P_CanPickupEmblem(&players[consoleplayer], mobj->health - 1))
|
||||
if (P_EmblemWasCollected(mobj->health - 1) || !P_CanPickupEmblem(NULL, mobj->health - 1))
|
||||
{
|
||||
trans = tr_trans50;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue