diff options
author | DBmaoha <56738369+DBmaoha@users.noreply.github.com> | 2022-09-25 07:48:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-25 01:48:07 +0200 |
commit | 7f819ca53f7dea47e7d51f43329a911d4327cecf (patch) | |
tree | 185e8d97413116acced698975da4ea1b5c781e1d /Northstar.CustomServers/mod/scripts/vscripts | |
parent | ecd37edc3f833526518cf6a6abb2bd128fd0a51c (diff) | |
download | NorthstarMods-7f819ca53f7dea47e7d51f43329a911d4327cecf.tar.gz NorthstarMods-7f819ca53f7dea47e7d51f43329a911d4327cecf.zip |
Refuse noclipping while player is setparented (#487)
* Update _northstar_cheatcommands.nut
* Cleaner Check
* Apply suggestions
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut b/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut index c79265ac..af3dfea5 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<string> 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" ) |