Codechange: Remove object enabled flag and shuffle members. (#10358)

`enabled` flag is replaced with IsEnabled() which checks if views is
non-zero.

ObjectSpec is shuffled to reduce its memory footprint.
This commit is contained in:
PeterN
2023-01-15 10:58:03 +00:00
committed by GitHub
parent 8f9a60893d
commit 2355882ec1
5 changed files with 14 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ ObjectSpec _object_specs[NUM_OBJECTS];
*/
bool ObjectSpec::IsEverAvailable() const
{
return this->enabled && HasBit(this->climate, _settings_game.game_creation.landscape) &&
return this->IsEnabled() && HasBit(this->climate, _settings_game.game_creation.landscape) &&
(this->flags & ((_game_mode != GM_EDITOR && !_generating_world) ? OBJECT_FLAG_ONLY_IN_SCENEDIT : OBJECT_FLAG_ONLY_IN_GAME)) == 0;
}