Bunch of revolver fixes (#19649)
* Bunch of revolver fixes Some stuff wasn't working with prediction so this should fix all of it. * a * fix weh * Also usedelay
This commit is contained in:
@@ -58,11 +58,11 @@ public sealed partial class GunSystem
|
||||
RaiseLocalEvent(uid, ev, false);
|
||||
}
|
||||
|
||||
protected override void UpdateAmmoCount(EntityUid uid)
|
||||
protected override void UpdateAmmoCount(EntityUid uid, bool prediction = true)
|
||||
{
|
||||
// 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 ||
|
||||
if (prediction && !Timing.IsFirstTimePredicted ||
|
||||
!TryComp<AmmoCounterComponent>(uid, out var clientComp))
|
||||
{
|
||||
return;
|
||||
@@ -98,7 +98,7 @@ public sealed partial class GunSystem
|
||||
{
|
||||
MinHeight = 15;
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
VerticalAlignment = Control.VAlignment.Center;
|
||||
AddChild(new BoxContainer
|
||||
{
|
||||
Orientation = BoxContainer.LayoutOrientation.Vertical,
|
||||
@@ -213,7 +213,7 @@ public sealed partial class GunSystem
|
||||
{
|
||||
MinHeight = 15;
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
VerticalAlignment = Control.VAlignment.Center;
|
||||
|
||||
AddChild(new BoxContainer
|
||||
{
|
||||
@@ -300,7 +300,7 @@ public sealed partial class GunSystem
|
||||
{
|
||||
MinHeight = 15;
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
VerticalAlignment = Control.VAlignment.Center;
|
||||
|
||||
AddChild(new BoxContainer
|
||||
{
|
||||
@@ -419,7 +419,7 @@ public sealed partial class GunSystem
|
||||
{
|
||||
MinHeight = 15;
|
||||
HorizontalExpand = true;
|
||||
VerticalAlignment = VAlignment.Center;
|
||||
VerticalAlignment = Control.VAlignment.Center;
|
||||
AddChild((_bulletsList = new BoxContainer
|
||||
{
|
||||
Orientation = BoxContainer.LayoutOrientation.Horizontal,
|
||||
|
||||
Reference in New Issue
Block a user