fixed timer displaying when it should not
This commit is contained in:
parent
4302ed9247
commit
c25a3e203e
@ -785,6 +785,7 @@ void SetupTimeleftTimer()
|
||||
if (!g_DidNotExtend)
|
||||
{
|
||||
SetupWarningTimer(WarningType_Vote);
|
||||
//PrintToChatAll("SetupWarningTimer 1");
|
||||
}
|
||||
//LogMessage("Mapchooser_extended_avg SetupWarningTimer call 2");
|
||||
}
|
||||
@ -800,7 +801,10 @@ void SetupTimeleftTimer()
|
||||
|
||||
//g_VoteTimer = CreateTimer(float(time - startTime), Timer_StartMapVoteTimer_StartMapVote, _, TIMER_FLAG_NO_MAPCHANGE);
|
||||
//LogMessage("Mapchooser_extended_avg g_VoteTimer Timer_StartWarningTimer");
|
||||
g_VoteTimer = CreateTimer(float(time - startTime), Timer_StartWarningTimer, _, TIMER_FLAG_NO_MAPCHANGE);
|
||||
if (GetConVarInt(g_Cvar_Extend) - g_Extends > 0)
|
||||
{
|
||||
g_VoteTimer = CreateTimer(float(time - startTime), Timer_StartWarningTimer, _, TIMER_FLAG_NO_MAPCHANGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -812,8 +816,8 @@ public Action Timer_StartWarningTimer(Handle timer)
|
||||
|
||||
if(!g_WarningInProgress || g_WarningTimer == INVALID_HANDLE)
|
||||
{
|
||||
//LogMessage("Mapchooser_extended_avg SetupWarningTimer call 3");
|
||||
SetupWarningTimer(WarningType_Vote);
|
||||
//PrintToChatAll("SetupWarningTimer 2");
|
||||
}
|
||||
return Plugin_Stop;
|
||||
}
|
||||
@ -1010,6 +1014,7 @@ public void CheckWinLimit(int winner_score)
|
||||
if(!g_WarningInProgress || g_WarningTimer == INVALID_HANDLE)
|
||||
{
|
||||
SetupWarningTimer(WarningType_Vote, MapChange_MapEnd);
|
||||
//PrintToChatAll("SetupWarningTimer 3");
|
||||
//LogMessage("Mapchooser_extended_avg SetupWarningTimer call 4");
|
||||
}
|
||||
}
|
||||
@ -1034,6 +1039,7 @@ public void CheckMaxRounds(int roundcount)
|
||||
if(!g_WarningInProgress || g_WarningTimer == INVALID_HANDLE)
|
||||
{
|
||||
SetupWarningTimer(WarningType_Vote, MapChange_MapEnd);
|
||||
//PrintToChatAll("SetupWarningTimer 4");
|
||||
//LogMessage("Mapchooser_extended_avg SetupWarningTimer call 5");
|
||||
}
|
||||
}
|
||||
@ -1061,6 +1067,7 @@ public Action Event_PlayerDeath(Handle event, const char[] name, bool dontBroadc
|
||||
if(!g_WarningInProgress || g_WarningTimer == INVALID_HANDLE)
|
||||
{
|
||||
SetupWarningTimer(WarningType_Vote, MapChange_MapEnd);
|
||||
//PrintToChatAll("SetupWarningTimer 5");
|
||||
//LogMessage("Mapchooser_extended_avg SetupWarningTimer call 6");
|
||||
}
|
||||
}
|
||||
@ -1072,6 +1079,7 @@ public Action Command_Mapvote(int client, int args)
|
||||
ShowActivity2(client, "[MCE] ", "%t", "Initiated Vote Map");
|
||||
|
||||
SetupWarningTimer(WarningType_Vote, MapChange_MapEnd, INVALID_HANDLE, true);
|
||||
//PrintToChatAll("SetupWarningTimer 6");
|
||||
//LogMessage("Mapchooser_extended_avg SetupWarningTimer call 7");
|
||||
|
||||
return Plugin_Handled;
|
||||
@ -1786,6 +1794,7 @@ public void Handler_MapVoteFinished(Handle menu,
|
||||
CPrintToChatAll("[MCE] %t", "Tie Vote", GetArraySize(mapList));
|
||||
//LogMessage("Mapchooser_extended_avg reached WarningType_Revote 1");
|
||||
SetupWarningTimer(WarningType_Revote, view_as<MapChange>(g_ChangeTime), mapList);
|
||||
//PrintToChatAll("SetupWarningTimer 7");
|
||||
return;
|
||||
}
|
||||
else if(most_voted_map_percentage < required_percent)
|
||||
@ -1811,6 +1820,7 @@ public void Handler_MapVoteFinished(Handle menu,
|
||||
CPrintToChatAll("[MCE] %t", "Revote Is Needed", required_percent);
|
||||
//LogMessage("Mapchooser_extended_avg reached WarningType_Revote 2");
|
||||
SetupWarningTimer(WarningType_Revote, view_as<MapChange>(g_ChangeTime), mapList);
|
||||
//PrintToChatAll("SetupWarningTimer 8");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2326,6 +2336,7 @@ public int Native_InitiateVote(Handle plugin, int numParams)
|
||||
LogAction(-1, -1, "Starting map vote because outside request");
|
||||
|
||||
SetupWarningTimer(WarningType_Vote, when, inputarray);
|
||||
//PrintToChatAll("SetupWarningTimer 9");
|
||||
//LogMessage("Mapchooser_extended_avg SetupWarningTimer call 1");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user