From 7f819ca53f7dea47e7d51f43329a911d4327cecf Mon Sep 17 00:00:00 2001 From: DBmaoha <56738369+DBmaoha@users.noreply.github.com> Date: Sun, 25 Sep 2022 07:48:07 +0800 Subject: Refuse noclipping while player is setparented (#487) * Update _northstar_cheatcommands.nut * Cleaner Check * Apply suggestions --- .../mod/scripts/vscripts/_northstar_cheatcommands.nut | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut b/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut index c79265ac1..af3dfea56 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut @@ -14,6 +14,11 @@ bool function ClientCommandCallbackToggleNoclip( entity player, array ar { if ( !GetConVarBool( "sv_cheats" ) ) return true + if( player.GetParent() ) // change movetype while setparented will crash the server + { + print( player + " failed noclipping because the entity is parented" ) + return true + } print( player + " TOGGLED NOCLIP" ) -- cgit v1.2.3