Remove gun .Owners (#14585)
This commit is contained in:
@@ -27,7 +27,8 @@ public sealed partial class GunSystem
|
||||
/// <param name="component"></param>
|
||||
private void RefreshControl(EntityUid uid, AmmoCounterComponent? component = null)
|
||||
{
|
||||
if (!Resolve(uid, ref component, false)) return;
|
||||
if (!Resolve(uid, ref component, false))
|
||||
return;
|
||||
|
||||
component.Control?.Dispose();
|
||||
component.Control = null;
|
||||
@@ -44,7 +45,8 @@ public sealed partial class GunSystem
|
||||
|
||||
private void UpdateAmmoCount(EntityUid uid, AmmoCounterComponent component)
|
||||
{
|
||||
if (component.Control == null) return;
|
||||
if (component.Control == null)
|
||||
return;
|
||||
|
||||
var ev = new UpdateAmmoCounterEvent()
|
||||
{
|
||||
@@ -59,7 +61,8 @@ public sealed partial class GunSystem
|
||||
// Don't use resolves because the method is shared and there's no compref and I'm trying to
|
||||
// share as much code as possible
|
||||
if (!Timing.IsFirstTimePredicted ||
|
||||
!TryComp<AmmoCounterComponent>(uid, out var clientComp)) return;
|
||||
!TryComp<AmmoCounterComponent>(uid, out var clientComp))
|
||||
return;
|
||||
|
||||
UpdateAmmoCount(uid, clientComp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user