Content update for NetEntities (#18935)

This commit is contained in:
metalgearsloth
2023-09-11 09:42:41 +10:00
committed by GitHub
parent 389c8d1a2c
commit 5a0fc68be2
526 changed files with 3058 additions and 2215 deletions

View File

@@ -69,7 +69,7 @@ public abstract class SharedMechSystem : EntitySystem
MaxIntegrity = component.MaxIntegrity,
Energy = component.Energy,
MaxEnergy = component.MaxEnergy,
CurrentSelectedEquipment = component.CurrentSelectedEquipment,
CurrentSelectedEquipment = GetNetEntity(component.CurrentSelectedEquipment),
Broken = component.Broken
};
}
@@ -83,7 +83,7 @@ public abstract class SharedMechSystem : EntitySystem
component.MaxIntegrity = state.MaxIntegrity;
component.Energy = state.Energy;
component.MaxEnergy = state.MaxEnergy;
component.CurrentSelectedEquipment = state.CurrentSelectedEquipment;
component.CurrentSelectedEquipment = EnsureEntity<MechComponent>(state.CurrentSelectedEquipment, uid);
component.Broken = state.Broken;
}
@@ -91,7 +91,7 @@ public abstract class SharedMechSystem : EntitySystem
{
args.State = new MechPilotComponentState
{
Mech = component.Mech
Mech = GetNetEntity(component.Mech)
};
}
@@ -100,7 +100,7 @@ public abstract class SharedMechSystem : EntitySystem
if (args.Current is not MechPilotComponentState state)
return;
component.Mech = state.Mech;
component.Mech = EnsureEntity<MechPilotComponent>(state.Mech, uid);
}
#endregion