@@ -1490,15 +1490,17 @@ void Scene::SaveSceneObject(Writer &writer, const SceneObject *sceneObjectToSave
1490
1490
}
1491
1491
1492
1492
writer.NewPropertyWithValue (" Position" , sceneObjectToSave->GetPos ());
1493
- writer.NewPropertyWithValue (" Team" , sceneObjectToSave->GetTeam ());
1494
- if (!isChildAttachable) {
1493
+ if (saveFullData || sceneObjectToSave->GetTeam () != Activity::Teams::NoTeam) {
1494
+ writer.NewPropertyWithValue (" Team" , sceneObjectToSave->GetTeam ());
1495
+ }
1496
+ if (!isChildAttachable && (saveFullData || sceneObjectToSave->GetPlacedByPlayer () != Players::NoPlayer)) {
1495
1497
writer.NewPropertyWithValue (" PlacedByPlayer" , sceneObjectToSave->GetPlacedByPlayer ());
1496
1498
}
1497
1499
if (saveFullData) {
1498
1500
writer.NewPropertyWithValue (" GoldValue" , sceneObjectToSave->GetGoldValue ());
1499
1501
}
1500
1502
1501
- if (const Deployment *deploymentToSave = dynamic_cast <const Deployment *>(sceneObjectToSave); deploymentToSave && deploymentToSave->GetID () != 0 ) {
1503
+ if (const Deployment *deploymentToSave = dynamic_cast <const Deployment *>(sceneObjectToSave); saveFullData && deploymentToSave && deploymentToSave->GetID () != 0 ) {
1502
1504
writer.NewPropertyWithValue (" ID" , deploymentToSave->GetID ());
1503
1505
}
1504
1506
@@ -1622,9 +1624,9 @@ void Scene::SaveSceneObject(Writer &writer, const SceneObject *sceneObjectToSave
1622
1624
}
1623
1625
1624
1626
if (const Actor *actorToSave = dynamic_cast <const Actor *>(sceneObjectToSave)) {
1625
- writer.NewPropertyWithValue (" Health" , actorToSave->GetHealth ());
1626
- writer.NewPropertyWithValue (" MaxHealth" , actorToSave->GetMaxHealth ());
1627
1627
if (saveFullData) {
1628
+ writer.NewPropertyWithValue (" Health" , actorToSave->GetHealth ());
1629
+ writer.NewPropertyWithValue (" MaxHealth" , actorToSave->GetMaxHealth ());
1628
1630
writer.NewPropertyWithValue (" Status" , actorToSave->GetStatus ());
1629
1631
writer.NewPropertyWithValue (" PlayerControllable" , actorToSave->IsPlayerControllable ());
1630
1632
0 commit comments