Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion afk/afk.sp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Release notes:
- Updated code to be compatible with SourceMod 1.12


---- 1.1.3 (27/07/2025) ----
- Fixed unnecessary tournament restart when server is almost empty


*/

#pragma semicolon 1
Expand All @@ -33,7 +37,7 @@ Release notes:
#undef REQUIRE_PLUGIN
#include <updater>

#define PLUGIN_VERSION "1.1.2"
#define PLUGIN_VERSION "1.1.3"
#define UPDATE_URL "https://sourcemod.krus.dk/afk/update.txt"


Expand Down
6 changes: 3 additions & 3 deletions afk/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "1.1.2"
"Latest" "1.1.3"
}

"Notes" "Changes in 1.1.2:"
"Notes" "- Updated code to be compatible with SourceMod 1.12"
"Notes" "Changes in 1.1.3:"
"Notes" "- Fixed unnecessary tournament restart when server is almost empty"
}

"Files"
Expand Down
6 changes: 5 additions & 1 deletion classwarning/classwarning.sp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Release notes:
---- 1.1.2 (10/07/2025) ----
- Updated code to be compatible with SourceMod 1.12


---- 1.1.3 (27/07/2025) ----
- Fixed unnecessary tournament restart when server is almost empty

*/

#pragma semicolon 1
Expand All @@ -32,7 +36,7 @@ Release notes:
#undef REQUIRE_PLUGIN
#include <updater>

#define PLUGIN_VERSION "1.1.2"
#define PLUGIN_VERSION "1.1.3"
#define UPDATE_URL "https://sourcemod.krus.dk/classwarning/update.txt"


Expand Down
6 changes: 3 additions & 3 deletions classwarning/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "1.1.2"
"Latest" "1.1.3"
}

"Notes" "Changes in 1.1.2:"
"Notes" "- Updated code to be compatible with SourceMod 1.12"
"Notes" "Changes in 1.1.3:"
"Notes" "- Fixed unnecessary tournament restart when server is almost empty"
}

"Files"
Expand Down
18 changes: 15 additions & 3 deletions includes/match.inc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void Match_OnPluginStart() {

// A player disconnected
// Purpose: When all players have disconnected, call ResetMatch
HookEvent("player_disconnect", Match_Event_player_disconnect, EventHookMode_PostNoCopy);
HookEvent("player_disconnect", Match_Event_player_disconnect, EventHookMode_Post);

// Hook mp_tournament_restart
// Purpose: Call ResetMatch when the tournament mode was reset
Expand Down Expand Up @@ -209,8 +209,20 @@ public void Match_Event_player_team_post(any data) {


public void Match_Event_player_disconnect(Event event, const char[] name, bool dontBroadcast) {
int count = GetRealPlayerCount();
if (count <= 1) {
int userid = event.GetInt("userid");
int client = GetClientOfUserId(userid);

bool anyPlayersLeftOnServer = false;
for (int c = 1; c <= MaxClients; c++) {
if (c == client)
continue;
if (IsRealPlayer2(c)) {
anyPlayersLeftOnServer = true;
break;
}
}

if (!anyPlayersLeftOnServer) {
// The server is really weird in this case.
// If one team readies up, the server empties, and then you connect and join the other team and ready up, nothing happens.
// But if you unready the same team and ready again, it works.
Expand Down
6 changes: 5 additions & 1 deletion logstf/logstf.sp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ Release notes:
- Changed match title trimming logic


---- 2.7.1 (27/07/2025) ----
- Fixed unnecessary tournament restart when server is almost empty


TODO:
- Some people run multiple instances of the same server (located in the same directory). This is a problem, because they all write to the same logstf.log file. Make the logstf.log and -partial files have dynamic names, and don't forget to clean them up.
- Sanitize names for < and >, since logs.tf doesn't like those
Expand All @@ -150,7 +154,7 @@ TODO:
#undef REQUIRE_PLUGIN
#include <updater>

#define PLUGIN_VERSION "2.7.0"
#define PLUGIN_VERSION "2.7.1"
#define UPDATE_URL "https://sourcemod.krus.dk/logstf/update.txt"

#define LOG_PATH "logstf.log"
Expand Down
6 changes: 3 additions & 3 deletions logstf/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "2.7.0"
"Latest" "2.7.1"
}

"Notes" "Changes in 2.7.0:"
"Notes" "- Changed match title trimming logic"
"Notes" "Changes in 2.7.1:"
"Notes" "- Fixed unnecessary tournament restart when server is almost empty"
}

"Files"
Expand Down
6 changes: 5 additions & 1 deletion recordstv/recordstv.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ Release notes:
- Updated code to be compatible with SourceMod 1.12


---- 1.1.3 (27/07/2025) ----
- Fixed unnecessary tournament restart when server is almost empty


TODO:
- Automatic zipping of match*.dem files

Expand All @@ -36,7 +40,7 @@ TODO:
#include <updater>


#define PLUGIN_VERSION "1.1.2"
#define PLUGIN_VERSION "1.1.3"
#define UPDATE_URL "https://sourcemod.krus.dk/recordstv/update.txt"


Expand Down
6 changes: 3 additions & 3 deletions recordstv/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "1.1.2"
"Latest" "1.1.3"
}

"Notes" "Changes in 1.1.2:"
"Notes" "- Updated code to be compatible with SourceMod 1.12"
"Notes" "Changes in 1.1.3:"
"Notes" "- Fixed unnecessary tournament restart when server is almost empty"
}

"Files"
Expand Down
6 changes: 5 additions & 1 deletion supstats2/supstats2.sp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ Release notes:
- Log meta data at the start of the match (matchid, map, title)


---- 2.6.1 (27/07/2025) ----
- Fixed unnecessary tournament restart when server is almost empty


TODO:
- Use GetGameTime() instead of GetEngineTime()?
- Write comments in code :D
Expand All @@ -116,7 +120,7 @@ TODO:
#undef REQUIRE_PLUGIN
#include <updater>

#define PLUGIN_VERSION "2.6.0"
#define PLUGIN_VERSION "2.6.1"
#define UPDATE_URL "https://sourcemod.krus.dk/supstats2/update.txt"

#define NAMELEN 64
Expand Down
6 changes: 3 additions & 3 deletions supstats2/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "2.6.0"
"Latest" "2.6.1"
}

"Notes" "Changes in 2.6.0:"
"Notes" "- Log meta data at the start of the match (matchid, map, title)"
"Notes" "Changes in 2.6.1:"
"Notes" "- Fixed unnecessary tournament restart when server is almost empty"
}

"Files"
Expand Down
6 changes: 3 additions & 3 deletions waitforstv/update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "1.1.2"
"Latest" "1.1.3"
}

"Notes" "Changes in 1.1.2:"
"Notes" "- Updated code to be compatible with SourceMod 1.12"
"Notes" "Changes in 1.1.3:"
"Notes" "- Fixed unnecessary tournament restart when server is almost empty"
}

"Files"
Expand Down
6 changes: 5 additions & 1 deletion waitforstv/waitforstv.sp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Release notes:
- Updated code to be compatible with SourceMod 1.12


---- 1.1.3 (27/07/2025) ----
- Fixed unnecessary tournament restart when server is almost empty


BUG:
- When using sm_map twice during a match, you cannot override the 90secs delay [Not a problem with waitforstv - ForceLevelChange simply doesn't call changelevel more than once per map.]

Expand All @@ -46,7 +50,7 @@ BUG:
#include <updater>


#define PLUGIN_VERSION "1.1.2"
#define PLUGIN_VERSION "1.1.3"
#define UPDATE_URL "https://sourcemod.krus.dk/waitforstv/update.txt"


Expand Down