Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hookzone issue #283

Merged
merged 1 commit into from
Aug 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions addons/sourcemod/scripting/surftimer/surfzones.sp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public Action StartTouchTrigger(int caller, int activator)

// Ignore dead players
if (!IsValidClient(client)) {
return Plugin_Handled;
return Plugin_Continue;
}

char sTargetName[256];
Expand All @@ -187,22 +187,22 @@ public Action StartTouchTrigger(int caller, int activator)
{
if (action[2] != g_iInBonus[activator])
{
return Plugin_Handled;
return Plugin_Continue;
}
}
else
{
if (!g_bInBonus[activator] && action[2] > 0)
{
return Plugin_Handled;
return Plugin_Continue;
}

else if (StrEqual(g_szMapName, "surf_christmas2") && !g_bUsingStageTeleport[activator])
{
if (action[0] == 3)
{
if (action[1] > (g_Stage[g_iClientInZone[activator][2]][activator] + 1) || action[1] < (g_Stage[g_iClientInZone[activator][2]][activator] - 1))
return Plugin_Handled;
return Plugin_Continue;
}
}
}
Expand All @@ -212,7 +212,7 @@ public Action StartTouchTrigger(int caller, int activator)
if (!g_bInBonus[activator] && action[2] > 0)
{
g_bInBonus[activator] = false;
return Plugin_Handled;
return Plugin_Continue;
}
else if (action[2] > 0)
g_bInBonus[activator] = true;
Expand All @@ -221,10 +221,6 @@ public Action StartTouchTrigger(int caller, int activator)
if (g_bUsingStageTeleport[activator])
g_bUsingStageTeleport[activator] = false;

// Set Client targetName
if (!StrEqual("player", g_mapZones[id].TargetName))
DispatchKeyValue(activator, "targetname", g_mapZones[id].TargetName);

if (action[2] == g_iClientInZone[activator][2]) // Is touching zone in right zonegroup
{
// Set client location
Expand Down Expand Up @@ -252,7 +248,7 @@ public Action StartTouchTrigger(int caller, int activator)
StartTouch(activator, action);
}

return Plugin_Handled;
return Plugin_Continue;
}

public Action EndTouchTrigger(int caller, int activator)
Expand All @@ -261,7 +257,7 @@ public Action EndTouchTrigger(int caller, int activator)

// Ignore dead players
if (!IsValidClient(client)) {
return Plugin_Handled;
return Plugin_Continue;
}

// For new speed limiter
Expand All @@ -271,7 +267,7 @@ public Action EndTouchTrigger(int caller, int activator)
if (g_bIgnoreZone[activator])
{
g_bIgnoreZone[activator] = false;
return Plugin_Handled;
return Plugin_Continue;
}

// Reset Prehop Limit
Expand All @@ -293,12 +289,12 @@ public Action EndTouchTrigger(int caller, int activator)
action[2] = g_mapZones[id].ZoneGroup;

if (action[2] != g_iClientInZone[activator][2] || action[0] == 6 || action[0] == 8 || action[0] != g_iClientInZone[activator][0]) // Ignore end touches in other zonegroups, zones that teleports away or multiple zones on top of each other // fluffys
return Plugin_Handled;
return Plugin_Continue;

// End touch
EndTouch(activator, action);

return Plugin_Handled;
return Plugin_Continue;
}

public void StartTouch(int client, int action[3])
Expand Down