Revolver fix (again) (#8635)
This commit is contained in:
@@ -54,13 +54,8 @@ public partial class SharedGunSystem
|
||||
|
||||
var oldIndex = component.CurrentIndex;
|
||||
component.CurrentIndex = state.CurrentIndex;
|
||||
|
||||
component.AmmoSlots.EnsureCapacity(state.AmmoSlots.Count);
|
||||
component.AmmoSlots.Clear();
|
||||
component.Chambers = new bool?[state.Chambers.Length];
|
||||
|
||||
DebugTools.Assert(component.AmmoSlots.Count == component.Chambers.Length);
|
||||
|
||||
// Need to copy across the state rather than the ref.
|
||||
for (var i = 0; i < component.AmmoSlots.Count; i++)
|
||||
{
|
||||
@@ -322,6 +317,8 @@ public partial class SharedGunSystem
|
||||
component.Chambers[i] = true;
|
||||
}
|
||||
}
|
||||
|
||||
DebugTools.Assert(component.AmmoSlots.Count == component.Capacity);
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
|
||||
Reference in New Issue
Block a user