comically retarded solution. but hey if it looks fine its fine

This commit is contained in:
jenz 2024-09-26 17:56:37 +02:00
parent 566916ff1b
commit 7e473490d1

View File

@ -993,6 +993,9 @@ public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason)
//sometimes it will simply happen that theres a mapvote where nobody votes anything.
//have to prevent server from being stuck in those situations with this timer.
InitiateVote(MapChange_Instant); //feature so mapvote happens at actual mapend
CreateTimer(1.0, unfreeze_players, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
//extending the map allows players to run around instead of being frozen. should just be careful about it running into edicts limits
}
delay = float(total_time);
return Plugin_Changed;
@ -1001,6 +1004,24 @@ public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason)
return Plugin_Continue;
}
public Action unfreeze_players(Handle hTimer, Handle dp)
{
char map[64];
GetCurrentMap(map, PLATFORM_MAX_PATH);
if (StrContains(map, "ze_", false) != -1)
{
ServerCommand("sm_testround");
CreateTimer(1.0, unfreeze_players2, INVALID_HANDLE, TIMER_FLAG_NO_MAPCHANGE);
}
return Plugin_Handled;
}
public Action unfreeze_players2(Handle hTimer, Handle dp)
{
ServerCommand("sm_extend 20"); //this is not actually meant for extending the map. Its meant to unfreeze players during the mapvote.
return Plugin_Handled;
}
public Action Timer_fall_back_map_switch(Handle hTimer, Handle dp)
{
ForceChangeLevel("ze_random_v9", "nobody voted at mapvote");