Skip to content

Commit a62fd55

Browse files
author
Liam
authored
Disable practice mode when player touches a start zone (#321)
1 parent d96ad43 commit a62fd55

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

addons/sourcemod/scripting/surftimer/surfzones.sp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ public void StartTouch(int client, int action[3])
334334
lastCheckpoint[g_iClientInZone[client][2]][client] = 1;
335335
g_bSaveLocTele[client] = false;
336336

337+
if (g_bPracticeMode[client])
338+
{
339+
g_bPracticeMode[client] = false;
340+
CPrintToChat(client, "%t", "PracticeNormal", g_szChatPrefix);
341+
}
342+
337343
if (g_bhasStages)
338344
{
339345
g_bWrcpTimeractivated[client] = false;
@@ -579,12 +585,6 @@ public void EndTouch(int client, int action[3])
579585
// Types: Start(1), End(2), Stage(3), Checkpoint(4), Speed(5), TeleToStart(6), Validator(7), Chekcer(8), Stop(0)
580586
if (action[0] == 1 || action[0] == 5)
581587
{
582-
if (g_bPracticeMode[client] && !g_bTimerRunning[client]) // If on practice mode, but timer isn't on - kick you out of practice mode and then start timer
583-
{
584-
g_bPracticeMode[client] = false;
585-
CPrintToChat(client, "%t", "PracticeNormal", g_szChatPrefix);
586-
}
587-
588588
if (!g_bPracticeMode[client])
589589
{
590590
g_Stage[g_iClientInZone[client][2]][client] = 1;

0 commit comments

Comments
 (0)