mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
ACS: Prevent spectators from using sector actions
This commit is contained in:
parent
2cba1b7820
commit
f56504e0d4
1 changed files with 18 additions and 1 deletions
19
src/p_spec.c
19
src/p_spec.c
|
|
@ -5920,11 +5920,28 @@ void P_CheckMobjTouchingSectorActions(mobj_t *mobj, boolean continuous)
|
|||
{
|
||||
sector_t *originalsector;
|
||||
|
||||
if (!mobj->subsector)
|
||||
if (mobj->subsector == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
originalsector = mobj->subsector->sector;
|
||||
|
||||
if (mobj->player != NULL)
|
||||
{
|
||||
if (mobj->player->spectator == true)
|
||||
{
|
||||
// Ignore spectators.
|
||||
return;
|
||||
}
|
||||
|
||||
if (mobj->player->pflags & PF_NOCONTEST)
|
||||
{
|
||||
// Ignore NO CONTEST.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
P_CheckMobj3DFloorAction(mobj, originalsector, continuous);
|
||||
if TELEPORTED(mobj) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue