mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-19 03:51:34 +00:00
noclip command: toggle MF_NOCLIPHEIGHT in spectator
This commit is contained in:
parent
56694b2740
commit
b1c3d1b2e7
1 changed files with 12 additions and 2 deletions
|
|
@ -5606,12 +5606,22 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum)
|
|||
|
||||
if (!P_MobjWasRemoved(player->mo))
|
||||
{
|
||||
player->mo->flags ^= MF_NOCLIP;
|
||||
UINT32 noclipFlags = MF_NOCLIP;
|
||||
|
||||
if (!(player->mo->flags & MF_NOCLIP))
|
||||
if (player->spectator)
|
||||
{
|
||||
noclipFlags |= MF_NOCLIPHEIGHT;
|
||||
}
|
||||
|
||||
if (player->mo->flags & MF_NOCLIP)
|
||||
{
|
||||
player->mo->flags &= ~(noclipFlags);
|
||||
status = "off";
|
||||
}
|
||||
else
|
||||
{
|
||||
player->mo->flags |= noclipFlags;
|
||||
}
|
||||
}
|
||||
|
||||
CV_CheaterWarning(targetPlayer, va("noclip %s", status));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue