RangedWeaponSystem doesn't send updates on past prediction.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
using Content.Client.GameObjects.Components.Weapons.Ranged;
|
||||
using Content.Client.Interfaces.GameObjects;
|
||||
using Content.Shared.Input;
|
||||
using Robust.Client.GameObjects.EntitySystems;
|
||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||
using Robust.Client.Interfaces.Input;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Input;
|
||||
using Robust.Shared.Interfaces.Timing;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
|
||||
namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
@@ -18,6 +19,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
[Dependency] private readonly IPlayerManager _playerManager;
|
||||
[Dependency] private readonly IEyeManager _eyeManager;
|
||||
[Dependency] private readonly IInputManager _inputManager;
|
||||
[Dependency] private readonly IGameTiming _gameTiming;
|
||||
#pragma warning restore 649
|
||||
|
||||
private InputSystem _inputSystem;
|
||||
@@ -38,6 +40,11 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
if (!_gameTiming.IsFirstTimePredicted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var canFireSemi = _isFirstShot;
|
||||
var state = _inputSystem.CmdStates.GetState(EngineKeyFunctions.Use);
|
||||
if (!_combatModeSystem.IsInCombatMode() || state != BoundKeyState.Down)
|
||||
@@ -71,6 +78,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
if (weapon.Automatic || canFireSemi)
|
||||
{
|
||||
Logger.Debug(IoCManager.Resolve<IGameTiming>().CurTick.ToString());
|
||||
weapon.SyncFirePos(worldPos);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user