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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user