From aaec53ec79326b84558930bc2e07271713b9da1c Mon Sep 17 00:00:00 2001 From: jenz Date: Tue, 13 Feb 2024 23:36:24 +0100 Subject: [PATCH] eventually i gotta hit it right with a spot that works --- mapchooser_extended/scripting/mapchooser_extended_avg.sp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mapchooser_extended/scripting/mapchooser_extended_avg.sp b/mapchooser_extended/scripting/mapchooser_extended_avg.sp index c2393a6..7feb581 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_avg.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_avg.sp @@ -704,7 +704,6 @@ public Action Command_SetNextmap(int client, int args) g_SaveCDOnMapEnd = true; else g_SaveCDOnMapEnd = false; - return Plugin_Handled; } @@ -1606,6 +1605,12 @@ public void Handler_VoteFinishedGeneric(char[] map, g_HasVoteStarted = false; g_MapVoteCompleted = true; + //checking on MapStart and MapEnd is not good enough. Players are not considered alive and on teams at those points in time. + //therefore instead applying the bool here after the mapvote completed. + if(InternalAreRestrictionsActive(false)) + g_SaveCDOnMapEnd = true; + else + g_SaveCDOnMapEnd = false; //PrintToChatAll("map: %s", map); CPrintToChatAll("[MCE] %t", "Nextmap Voting Finished", map, RoundToFloor((map_votes /num_votes)*100.0));