Skip to content

Commit

Permalink
Merge pull request #52 from RGLgg/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
l-Aad-l authored Sep 28, 2022
2 parents 65f5aef + 97a0a23 commit d58bf2f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
20 changes: 19 additions & 1 deletion addons/sourcemod/scripting/disabled/roundtimer_override.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
#include <sdktools>

ConVar round_time_override = null;
Handle timer_preventSpam = INVALID_HANDLE;

public Plugin myinfo =
{
name = "Roundtimer Override",
author = "Dooby Skoo",
description = "???",
version = "0.0.3",
url = "https://github.com/dewbsku"
};

public void OnPluginStart()
{
Expand All @@ -26,5 +36,13 @@ public void timer_spawn_post(int timer)
{
SetVariantInt(round_time_override.IntValue);
AcceptEntityInput(timer, "SetMaxTime");
PrintToChatAll("Overrode round timer time to %d seconds", round_time_override.IntValue);
if(timer_preventSpam==INVALID_HANDLE){
PrintToChatAll("Overrode round timer time to %d seconds", round_time_override.IntValue);
timer_preventSpam = CreateTimer(1.0, preventSpam, _, TIMER_FLAG_NO_MAPCHANGE);
}
}

public Action preventSpam(Handle timer){
timer_preventSpam = INVALID_HANDLE;
return Plugin_Continue;
}
4 changes: 2 additions & 2 deletions cfg/rgl_6s_5cp_match_half1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ exec "rgl_6s_base"

servercfgfile "rgl_6s_5cp_match_half1" // sets server cfg to this config so that it gets autoexeced on level change

sm plugins load improved_match_timer // loads the improved match timer
sm plugins load disabled/roundtimer_override // loads roundtimer_override

mp_timelimit "30" // sets server timelimit to 30 minutes
mp_winlimit "3" // sets number of wins to win each half to 3
mp_windifference "0" // unsets windifference
mp_maxrounds "0" // unsets maxrounds

mp_timelimit_improved "1" // enables the Improved Match Timer plugin
mp_timelimit_improved "0" // enables the Improved Match Timer plugin
mp_roundtime "300" // sets round timer to 5 minutes

mp_tournament_restart // restarts the tournament to apply above settings
Expand Down
4 changes: 2 additions & 2 deletions cfg/rgl_6s_5cp_match_half2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

servercfgfile "rgl_6s_5cp_match_half2" // sets server cfg to this config so that it gets autoexeced on level change

sm plugins load improved_match_timer // loads the improved match timer
sm plugins load disabled/roundtimer_override // loads roundtimer_override

mp_timelimit "30" // sets server timelimit to 30 minutes
mp_winlimit "5" // sets number of wins to win each half to 3
mp_windifference "0" // unsets windifference
mp_maxrounds "0" // unsets maxrounds

mp_timelimit_improved "1" // enables the Improved Match Timer plugin
mp_timelimit_improved "0" // enables the Improved Match Timer plugin
mp_roundtime "300" // sets round timer to 5 minutes

mp_tournament_restart // restarts the tournament to apply above settings (this is only in here as a kludge because most teams reexec this cfg to end their games instead of rgl_off)
Expand Down
4 changes: 2 additions & 2 deletions cfg/rgl_6s_5cp_scrim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ exec "rgl_6s_base"

servercfgfile "rgl_6s_5cp_scrim" // sets server cfg to this config so that it gets autoexeced on level change

sm plugins load improved_match_timer // loads the improved match timer
sm plugins load disabled/roundtimer_override // loads roundtimer_override

mp_timelimit "30" // sets server timelimit to 30 minutes
mp_winlimit "5" // sets number of wins to win the scrim to 5
mp_windifference "0" // unsets windifference
mp_maxrounds "0" // unsets maxrounds

mp_timelimit_improved "1" // enables the Improved Match Timer plugin
mp_timelimit_improved "0" // enables the Improved Match Timer plugin
mp_roundtime "300" // sets round timer to 5 minutes

mp_tournament_restart // restarts the tournament to apply above settings
Expand Down
1 change: 1 addition & 0 deletions cfg/rgl_base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sm plugins load rglqol // loads the qol plugin in RGL
sm plugins reload updater // reloads updater to prevent issues where it refuses to update on changelevel
sm_updater 2 // sets updater to download only plugins/cfgs
sm_updater_check // autoupdates to prevent tampering with non custom cfgs
sm plugins unload disabled/roundtimer_override // unloads the old improved match timer from any server that may still have it enabled
sm plugins unload roundtimer_override // unloads the old improved match timer from any server that may still have it enabled
sm plugins unload improved_match_timer // unloads the improved match timer, not used by all formats
sm plugins unload tf2Halftime // unloads tf2Halftime plugin
Expand Down

0 comments on commit d58bf2f

Please sign in to comment.