changed the mp_chattime to use revote warning timer cvar. removed some logging
This commit is contained in:
		
							parent
							
								
									aad7bf415b
								
							
						
					
					
						commit
						5fbae4b560
					
				| @ -432,7 +432,7 @@ public void OnPluginStart() | ||||
|     InternalRestoreMapCooldowns(); | ||||
| 
 | ||||
| 
 | ||||
|     int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_WarningTime) + 10; | ||||
|     int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_RunOffWarningTime) + 10; | ||||
|     ServerCommand("sm_cvar mp_chattime %i", total_time); //prevents map switching supposedly. | ||||
| } | ||||
| 
 | ||||
| @ -494,7 +494,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max | ||||
| 
 | ||||
| public void OnMapStart() | ||||
| { | ||||
|     int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_WarningTime) + 10; | ||||
|     int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_RunOffWarningTime) + 10; | ||||
|     ServerCommand("sm_cvar mp_chattime %i", total_time); //prevents map switching supposedly. | ||||
|     g_DidRoundTerminate = false; | ||||
|     g_IniatedLastVote = false; | ||||
| @ -595,7 +595,7 @@ public void OnConfigsExecuted() | ||||
| 
 | ||||
| public void OnMapEnd() | ||||
| { | ||||
|     int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_WarningTime) + 10; | ||||
|     int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_RunOffWarningTime) + 10; | ||||
|     ServerCommand("sm_cvar mp_chattime %i", total_time); | ||||
| 
 | ||||
|     g_DidNotExtend = false; | ||||
| @ -802,7 +802,6 @@ void SetupTimeleftTimer() | ||||
|                 SetupWarningTimer(WarningType_Vote); | ||||
|                 //PrintToChatAll("SetupWarningTimer 1"); | ||||
|             } | ||||
|             //LogMessage("Mapchooser_extended_avg SetupWarningTimer call 2"); | ||||
|         } | ||||
|         else | ||||
|         { | ||||
| @ -816,7 +815,7 @@ void SetupTimeleftTimer() | ||||
| 
 | ||||
|                 //g_VoteTimer = CreateTimer(float(time - startTime), Timer_StartMapVoteTimer_StartMapVote, _, TIMER_FLAG_NO_MAPCHANGE); | ||||
|                 //LogMessage("Mapchooser_extended_avg g_VoteTimer Timer_StartWarningTimer"); | ||||
|                 if (GetConVarInt(g_Cvar_Extend) - g_Extends > 0) | ||||
|                 if (GetConVarInt(g_Cvar_Extend) - g_Extends > 0 && !g_DidNotExtend) | ||||
|                 { | ||||
|                     g_VoteTimer = CreateTimer(float(time - startTime), Timer_StartWarningTimer, _, TIMER_FLAG_NO_MAPCHANGE); | ||||
|                 } | ||||
| @ -981,7 +980,7 @@ public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason) | ||||
|     } | ||||
|     if (timeleft <= 0 && !g_ChangeMapAtRoundEnd) | ||||
|     { | ||||
|         int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_WarningTime) + 10; | ||||
|         int total_time = (GetConVarInt(g_Cvar_VoteDuration) * 2) + GetConVarInt(g_Cvar_RunOffWarningTime) + 10; | ||||
|         if (!g_IniatedLastVote) | ||||
|         { | ||||
|             g_IniatedLastVote = true; | ||||
| @ -1062,7 +1061,6 @@ public void CheckWinLimit(int winner_score) | ||||
|             { | ||||
|                 SetupWarningTimer(WarningType_Vote, MapChange_MapEnd); | ||||
|                 //PrintToChatAll("SetupWarningTimer 3"); | ||||
|                 //LogMessage("Mapchooser_extended_avg SetupWarningTimer call 4"); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| @ -1087,7 +1085,6 @@ public void CheckMaxRounds(int roundcount) | ||||
|             { | ||||
|                 SetupWarningTimer(WarningType_Vote, MapChange_MapEnd); | ||||
|                 //PrintToChatAll("SetupWarningTimer 4"); | ||||
|                 //LogMessage("Mapchooser_extended_avg SetupWarningTimer call 5"); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| @ -1115,7 +1112,6 @@ public Action Event_PlayerDeath(Handle event, const char[] name, bool dontBroadc | ||||
|         { | ||||
|             SetupWarningTimer(WarningType_Vote, MapChange_MapEnd); | ||||
|             //PrintToChatAll("SetupWarningTimer 5"); | ||||
|             //LogMessage("Mapchooser_extended_avg SetupWarningTimer call 6"); | ||||
|         } | ||||
|     } | ||||
|     return Plugin_Continue; | ||||
| @ -2392,7 +2388,6 @@ public int Native_InitiateVote(Handle plugin, int numParams) | ||||
|     { | ||||
|         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