• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)


Commit MetaInfo

Revisão8cd9d65c2c3f8c17e9b1dcd2b81e8df89f0e6ab8 (tree)
Hora2022-12-15 23:43:36
AutorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Mensagem de Log

Fixed: when the server printed a list of flags that were changed, it didn't check if a flag CVar existed first before incrementing the number of flags changed (e.g. "dmflags2 1" doesn't enable any flags because no flag CVar occupies the first bit of dmflags2).

Mudança Sumário

Diff

diff -r 3d1dc73737a3 -r 8cd9d65c2c3f docs/zandronum-history.txt
--- a/docs/zandronum-history.txt Thu Dec 15 09:21:49 2022 -0500
+++ b/docs/zandronum-history.txt Thu Dec 15 09:43:36 2022 -0500
@@ -85,6 +85,7 @@
8585 - - Fixed: the server didn't always update the correct flagset (e.g. dmflags, compatflags, lmsspectatorsettings) to the clients. [Kaminsky]
8686 - - Fixed: the server would still print which flags have changed for lmsallowedweapons when the current game mode wasn't (T)LMS. [Kaminsky]
8787 - - Fixed: Every client's ping would be stuck at zero on a Linux server that was running for more than 24 consecutive days. [Kaminsky]
88+- - Fixed: when the server printed a list of flags that were changed, it didn't check if a flag CVar existed first before incrementing the number of flags changed (e.g. "dmflags2 1" doesn't enable any flags because no flag CVar occupies the first bit of dmflags2). [Kaminsky]
8889 ! - The result value of GAMEEVENT_MEDALS event scripts can now be used to determine whether or not the player receives the medal. [Kaminsky]
8990 ! - 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]
9091 ! - Added an extra check to ensure that game modes have a (short) name. [Kaminsky]
diff -r 3d1dc73737a3 -r 8cd9d65c2c3f src/sv_main.cpp
--- a/src/sv_main.cpp Thu Dec 15 09:21:49 2022 -0500
+++ b/src/sv_main.cpp Thu Dec 15 09:43:36 2022 -0500
@@ -4437,26 +4437,27 @@
44374437 if ((( value ^ oldValue ) & bit ) == 0 )
44384438 continue;
44394439
4440- // [AK] Print the name of the CVar and its new value while we still can.
4441- if ( ++flagsChanged <= maxflags )
4442- {
4443- for ( FBaseCVar* cvar = CVars; cvar; cvar = cvar->GetNext( ) )
4440+ for ( FBaseCVar* cvar = CVars; cvar; cvar = cvar->GetNext( ))
4441+ {
4442+ // [AK] Make sure that this CVar is a flag.
4443+ if ( cvar->IsFlagCVar( ) == false )
4444+ continue;
4445+
4446+ FFlagCVar* flagCVar = static_cast<FFlagCVar*>( cvar );
4447+
4448+ // [AK] Check if this CVar belongs to the flagset and matches the corresponding bit.
4449+ if (( flagCVar->GetValueVar( ) == &flagset ) && ( flagCVar->GetBitVal( ) == bit ))
44444450 {
4445- // [AK] Make sure that this CVar is a flag.
4446- if ( cvar->IsFlagCVar( ) == false )
4447- continue;
4448-
4449- FFlagCVar* flagCVar = static_cast<FFlagCVar*>( cvar );
4450-
4451- // [AK] Check if this CVar belongs to the flagset and matches the corresponding bit.
4452- if (( flagCVar->GetValueVar( ) == &flagset ) && ( flagCVar->GetBitVal( ) == bit ))
4451+ // [AK] Print the name of the CVar and its new value while we still can.
4452+ if ( ++flagsChanged <= maxflags )
44534453 {
44544454 if ( flagsChanged > 1 )
44554455 result += ", ";
44564456
44574457 result.AppendFormat( "%s %s", flagCVar->GetName( ), ( value & bit ) ? "ON" : "OFF" );
4458- break;
44594458 }
4459+
4460+ break;
44604461 }
44614462 }
44624463 }