This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
Revisão | 8cd9d65c2c3f8c17e9b1dcd2b81e8df89f0e6ab8 (tree) |
---|---|
Hora | 2022-12-15 23:43:36 |
Autor | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
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).
@@ -85,6 +85,7 @@ | ||
85 | 85 | - - Fixed: the server didn't always update the correct flagset (e.g. dmflags, compatflags, lmsspectatorsettings) to the clients. [Kaminsky] |
86 | 86 | - - Fixed: the server would still print which flags have changed for lmsallowedweapons when the current game mode wasn't (T)LMS. [Kaminsky] |
87 | 87 | - - 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] | |
88 | 89 | ! - The result value of GAMEEVENT_MEDALS event scripts can now be used to determine whether or not the player receives the medal. [Kaminsky] |
89 | 90 | ! - 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] |
90 | 91 | ! - Added an extra check to ensure that game modes have a (short) name. [Kaminsky] |
@@ -4437,26 +4437,27 @@ | ||
4437 | 4437 | if ((( value ^ oldValue ) & bit ) == 0 ) |
4438 | 4438 | continue; |
4439 | 4439 | |
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 )) | |
4444 | 4450 | { |
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 ) | |
4453 | 4453 | { |
4454 | 4454 | if ( flagsChanged > 1 ) |
4455 | 4455 | result += ", "; |
4456 | 4456 | |
4457 | 4457 | result.AppendFormat( "%s %s", flagCVar->GetName( ), ( value & bit ) ? "ON" : "OFF" ); |
4458 | - break; | |
4459 | 4458 | } |
4459 | + | |
4460 | + break; | |
4460 | 4461 | } |
4461 | 4462 | } |
4462 | 4463 | } |