Use std::optional instead of sentinel values for absent data
This commit is contained in:
@@ -398,8 +398,7 @@ entt::entity ShipSystem::spawn(const std::string& schematicId,
|
||||
maxCollRange * static_cast<float>(m_config.world.orbitFactor);
|
||||
m_admin.addComponent<SalvageScrapBehavior>(entity, salvage);
|
||||
|
||||
DeliverScrapBehavior deliver;
|
||||
deliver.deliveryBay = kInvalidBuildingId;
|
||||
DeliverScrapBehavior deliver; // deliveryBay starts unassigned (nullopt)
|
||||
m_admin.addComponent<DeliverScrapBehavior>(entity, deliver);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user