diff --git a/ThankYou.md b/ThankYou.md new file mode 100644 index 0000000..088ab83 --- /dev/null +++ b/ThankYou.md @@ -0,0 +1,21 @@ +Steph for maintaining and updating the first iteration of the plugin, in addition to creating the configs + +Aad for making the plugin + +Mastercomms for helping me out with net settings + +Arie from serveme for letting me run some things by him for the configs + +JarateKing for adding a .gitattributes file and fixing typos and grammar because I suck with github and english + +Sigafoo for running RGL + +F2 for making the original pause plugin, and others + +Miggy for being a cool anticheat admin who inspired me to make the configs in the first place + +shoutouts to lange, originally borrowed this from soap_tournament.smx here: https://github.com/Lange/SOAP-TF2DM/blob/master/addons/sourcemod/scripting/soap_tournament.sp#L48 + +nosoop for the pure checking code + +Thanks to plenty of other people for helping me with miscellaneous other stuff \ No newline at end of file diff --git a/addons/sourcemod/scripting/rglqol.sp b/addons/sourcemod/scripting/rglqol.sp index 70133fd..b4a483f 100644 --- a/addons/sourcemod/scripting/rglqol.sp +++ b/addons/sourcemod/scripting/rglqol.sp @@ -55,8 +55,7 @@ public OnPluginStart() PrintColoredChatAll("\x07FFA07A[RGLQoL]\x01 version \x07FFA07A%s\x01 has been \x073EFF3Eloaded\x01.", PLUGIN_VERSION); // hooks round start events HookEvent("teamplay_round_start", EventRoundStart); - // shoutouts to lange, originally borrowed this from soap_tournament.smx here: https://github.com/Lange/SOAP-TF2DM/blob/master/addons/sourcemod/scripting/soap_tournament.sp#L48 - + // Win conditions met (maxrounds, timelimit) HookEvent("teamplay_game_over", GameOverEvent); // Win conditions met (windifference) @@ -78,19 +77,6 @@ public OnMapStart() ServerCommand("sm plugins unload waitforstv"); } -public OnClientPostAdminCheck(client) -{ - CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); -} - -public Action prWelcomeClient(Handle timer, int userid) -{ - int client = GetClientOfUserId(userid); - if (client) - { - PrintColoredChat(client, "\x07FFA07A[RGLQoL]\x01 This server is running RGL QoL version \x07FFA07A%s\x01", PLUGIN_VERSION); - } -} public Action EventRoundStart(Handle event, const char[] name, bool dontBroadcast) { @@ -102,7 +88,7 @@ public Action EventRoundStart(Handle event, const char[] name, bool dontBroadcas // checks stuff for restarting server public Action checkStuff(Handle timer) { - // we could use tv_enable value here but it wouldn't be accurate if stv hasn't joined yet + // using tv_enable value here would be inaccurate if stv hasn't joined yet char tvStatusOut[512]; ServerCommandEx(tvStatusOut, sizeof(tvStatusOut), "tv_status"); if (StrContains(tvStatusOut, "SourceTV not active") != -1) @@ -125,7 +111,7 @@ public Action checkStuff(Handle timer) { CfgExecuted = false; } - // if the server isnt empty, don't restart! Duh + // if the server isnt empty, don't restart! if (curplayers > 0) { LogMessage("[RGLQoL] At least 1 player on server. Not restarting."); @@ -143,7 +129,7 @@ public Action checkStuff(Handle timer) LogMessage("[RGLQoL] STV is currently live! Not restarting."); return; } - // ok. if we got this far, restart the server + // restarts the server if it is empty else { LogMessage("[RGLQoL] Server empty. Issuing sv_shutdown."); @@ -180,7 +166,7 @@ public OnSTVChanged(ConVar convar, char[] oldValue, char[] newValue) if (StringToInt(newValue) == 1) { LogMessage("[RGLQoL] tv_enable changed to 1! Changing level in 30 seconds unless manual map change occurs before then."); - change30(); + change15(); } else if (StringToInt(newValue) == 0) { @@ -191,7 +177,6 @@ public OnSTVChanged(ConVar convar, char[] oldValue, char[] newValue) public OnServerCfgChanged(ConVar convar, char[] oldValue, char[] newValue) { // if cfg changes, then update tv_maxclients to 5 - // closes https://github.com/stephanieLGBT/rgl-server-resources/issues/14 if (GetConVarInt(FindConVar("tv_maxclients")) == 128) { SetConVarInt(FindConVar("tv_maxclients"), 5); @@ -235,7 +220,7 @@ public SetDefaultWhitelist() } } -// pure checking code below provided by nosoop ("top kekkeroni#4449" on discord) thank you i love you +// pure checking code public Action OnPure(int client, const char[] command, int argc) { if (argc > 0) @@ -252,16 +237,16 @@ public void InvokePureCommandCheck(any ignored) if (StrContains(pureOut, "changelevel") != -1) { LogMessage("[RGLQoL] sv_pure cvar changed! Changing level in 30 seconds unless manual map change occurs before then."); - change30(); + change15(); } } -public change30() +public change15() { if (!alreadyChanging) { g_hWarnServ = CreateTimer(5.0, WarnServ, TIMER_FLAG_NO_MAPCHANGE); - g_hForceChange = CreateTimer(30.0, ForceChange, TIMER_FLAG_NO_MAPCHANGE); + g_hForceChange = CreateTimer(15.0, ForceChange, TIMER_FLAG_NO_MAPCHANGE); alreadyChanging = true; } } diff --git a/addons/sourcemod/scripting/rglupdater.sp b/addons/sourcemod/scripting/rglupdater.sp index 0014350..a93df24 100644 --- a/addons/sourcemod/scripting/rglupdater.sp +++ b/addons/sourcemod/scripting/rglupdater.sp @@ -62,7 +62,13 @@ public OnRGLBetaChanged(ConVar convar, char[] oldValue, char[] newValue) public OnClientPostAdminCheck(client) { - CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); + char cfgVal[128]; + GetConVarString(FindConVar("servercfgfile"), cfgVal, sizeof(cfgVal)); + if (StrContains(cfgVal, "rgl") != -1) + { + CreateTimer(15.0, prWelcomeClient, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE); + } + } public Action prWelcomeClient(Handle timer, int userid) diff --git a/cfg/rgl_base.cfg b/cfg/rgl_base.cfg index 2aaf08d..edc406a 100644 --- a/cfg/rgl_base.cfg +++ b/cfg/rgl_base.cfg @@ -3,21 +3,22 @@ // Created May 11, 2019 -- Updated May 22, 2020 // DO NOT EXEC THIS MANUALLY +sm plugins load rglqol // loads the qol plugin in RGL configs 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 // TF2 Comp Fixes -sm_deterministic_fall_damage 1 -sm_fix_ghost_crossbow_bolts 1 -sm_fix_slope_bug 1 -sm_fix_sticky_delay 1 -sm_gunboats_always_apply 0 -sm_projectiles_ignore_teammates 0 -sm_remove_halloween_souls 1 -sm_remove_medic_attach_speed 0 -sm_remove_pipe_spin 0 -sm_rest_in_peace_rick_may 128 +sm_deterministic_fall_damage 1 +sm_fix_ghost_crossbow_bolts 1 +sm_fix_slope_bug 1 +sm_fix_sticky_delay 1 +sm_gunboats_always_apply 0 +sm_projectiles_ignore_teammates 0 +sm_remove_halloween_souls 1 +sm_remove_medic_attach_speed 0 +sm_remove_pipe_spin 0 +sm_rest_in_peace_rick_may 128 sm_winger_jump_bonus_when_fully_deployed 0 con_timestamp "1" // timestamps console log @@ -114,6 +115,7 @@ tv_maxrate "0" // sets STV maxrate to unlimite tv_msg "" // turns off any previously set tv_msg stuff tv_relayvoice "0" // turns off voice in STV tv_snapshotrate "66" // broadcasts 66 STV snapshots per second +tv_deltacache "0" // forces full ticks to be sent to stv as opposed to delta ticks tv_timeout "10" // sets STV timeout to 10 seconds tv_transmitall "1" // transmits all entity data from STV, not just visible entities // ^ THIS DOES NOT REPLACE SOURCETV+, which can be found here: https://github.com/dalegaard/srctvplus diff --git a/cfg/rgl_off.cfg b/cfg/rgl_off.cfg index 5a0c6f7..1991b91 100644 --- a/cfg/rgl_off.cfg +++ b/cfg/rgl_off.cfg @@ -184,7 +184,7 @@ mp_maxrounds "0" // unsets maxrounds sv_password "" // defaults server password. overwritten by password in server.cfg, if you have one set tv_password "" // defaults stv password - +sm plugins unload rglqol // unloads the qol plugin so that it does not interfer with any other config. exec "server.cfg" // execs the settings in your server.cfg servercfgfile "server.cfg" // execs your server cfg file on map change