Skip to content

Commit 6b7013b

Browse files
Merge pull request #2 from shavitush/master
shavit-misc Add cvar UnNoclipOnRestart (shavitush#1232)
2 parents ddd0e18 + 2726865 commit 6b7013b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

addons/sourcemod/scripting/shavit-misc.sp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Convar gCV_StopTimerWarning = null;
112112
Convar gCV_WRMessages = null;
113113
Convar gCV_BhopSounds = null;
114114
Convar gCV_RestrictNoclip = null;
115+
Convar gCV_UnNoclipOnRestart = null;
115116
Convar gCV_SpecScoreboardOrder = null;
116117
Convar gCV_BadSetLocalAnglesFix = null;
117118
ConVar gCV_PauseMovement = null;
@@ -295,6 +296,7 @@ public void OnPluginStart()
295296
gCV_WRMessages = new Convar("shavit_misc_wrmessages", "3", "How many \"NEW <style> WR!!!\" messages to print?\n0 - Disabled", 0, true, 0.0, true, 100.0);
296297
gCV_BhopSounds = new Convar("shavit_misc_bhopsounds", "1", "Should bhop (landing and jumping) sounds be muted?\n1 - Blocked while !hide is enabled\n2 - Always blocked", 0, true, 1.0, true, 2.0);
297298
gCV_RestrictNoclip = new Convar("shavit_misc_restrictnoclip", "0", "Should noclip be be restricted\n0 - Disabled\n1 - No vertical velocity while in noclip in start zone\n2 - No noclip in start zone", 0, true, 0.0, true, 2.0);
299+
gCV_UnNoclipOnRestart = new Convar("shavit_misc_unnocliponrestart", "1", "Should noclip be disabled when a player restarts their timer while in noclip?\n0 - Disabled\n1 - Normal movement will be restored on restart", 0, true, 0.0, true, 1.0);
298300
gCV_SpecScoreboardOrder = new Convar("shavit_misc_spec_scoreboard_order", "1", "Use scoreboard ordering for players when changing target when spectating.", 0, true, 0.0, true, 1.0);
299301

300302
if (gEV_Type != Engine_TF2)
@@ -2378,6 +2380,11 @@ public void Shavit_OnRestart(int client, int track)
23782380
SetEntProp(client, Prop_Send, "m_bHasHelmet", 1);
23792381
}
23802382
}
2383+
2384+
if(gCV_UnNoclipOnRestart.BoolValue)
2385+
{
2386+
SetEntityMoveType(client, MOVETYPE_WALK);
2387+
}
23812388
}
23822389

23832390
public Action Shavit_OnStyleCommandPre(int client, int oldstyle, int newstyle, int track)

0 commit comments

Comments
 (0)