mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-01 19:26:11 +00:00
Merge branch 'acs-sector-no-spectator' into 'master'
ACS: Prevent spectators from using sector actions See merge request KartKrew/Kart!1219
This commit is contained in:
commit
41770be966
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