• R/O
  • SSH

zandronum-sandbox-stable: Commit


Commit MetaInfo

Revision8e83c7303d9593771728791ed0a96adaccec0da1 (tree)
Time2022-10-02 23:04:13
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Fixed: the server would still print which flags have changed for lmsallowedweapons when the current game mode wasn't (T)LMS.

Change Summary

Incremental Difference

diff -r 53553da2ffea -r 8e83c7303d95 docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Sun Oct 02 10:01:31 2022 -0400
+++ b/docs/zandronum-history.txt Sun Oct 02 10:04:13 2022 -0400
@@ -82,6 +82,7 @@
8282 - - Fixed: players didn't receive keys that were already found if respawning with a different class while sv_sharekeys was enabled. [Kaminsky]
8383 - - Fixed: cl_medals also affected the server and could prevent players from earning any medals if disabled. [Kaminsky]
8484 - - Fixed: the server didn't always update the correct flagset (e.g. dmflags, compatflags, lmsspectatorsettings) to the clients. [Kaminsky]
85+- - Fixed: the server would still print which flags have changed for lmsallowedweapons when the current game mode wasn't (T)LMS. [Kaminsky]
8586 ! - The result value of GAMEEVENT_MEDALS event scripts can now be used to determine whether or not the player receives the medal. [Kaminsky]
8687 ! - GAMEMODE flags are now validated after all GAMEMODE lumps have been parsed instead of after each one. The internal game mode name (e.g. "TeamLMS") is now printed with the error message instead of the actual name. [Kaminsky]
8788 ! - Added an extra check to ensure that game modes have a (short) name. [Kaminsky]
diff -r 53553da2ffea -r 8e83c7303d95 src/sv_main.cpp
--- a/src/sv_main.cpp Sun Oct 02 10:01:31 2022 -0400
+++ b/src/sv_main.cpp Sun Oct 02 10:04:13 2022 -0400
@@ -4436,6 +4436,10 @@
44364436 if (( NETWORK_GetState( ) != NETSTATE_SERVER ) || ( gamestate == GS_STARTUP ) || ( value == oldValue ))
44374437 return;
44384438
4439+ // [AK] Don't do anything with lmsallowedweapons unless we're playing (T)LMS.
4440+ if (( &flagset == &lmsallowedweapons ) && ( lastmanstanding == false ) && ( teamlms == false ))
4441+ return;
4442+
44394443 FString result;
44404444 int flagsChanged = 0;
44414445
@@ -4480,18 +4484,11 @@
44804484
44814485 // [AK] We also need to tell the clients to update the changed flagset.
44824486 if ( &flagset == &lmsspectatorsettings )
4483- {
44844487 SERVERCOMMANDS_SetLMSSpectatorSettings( );
4485- }
44864488 else if ( &flagset == &lmsallowedweapons )
4487- {
4488- if (( lastmanstanding ) || ( teamlms ))
4489- SERVERCOMMANDS_SetLMSAllowedWeapons( );
4490- }
4489+ SERVERCOMMANDS_SetLMSAllowedWeapons( );
44914490 else
4492- {
44934491 SERVERCOMMANDS_SetGameDMFlags( );
4494- }
44954492 }
44964493
44974494 //*****************************************************************************
Show on old repository browser