From 4157e0a90b044c303a90e8b2d90362d0c120cb82 Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Fri, 24 May 2024 12:12:55 +0200 Subject: [PATCH] More sync on firearm controller --- .../CoopClientFirearmController.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs b/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs index 3013dce1..2e049ff0 100644 --- a/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs +++ b/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs @@ -366,6 +366,23 @@ public override void SetLightsState(GStruct164[] lightsStates, bool force = fals } public override void SetScopeMode(GStruct165[] scopeStates) + { + SendScopeStates(scopeStates); + base.SetScopeMode(scopeStates); + } + public override void OpticCalibrationSwitchUp(GStruct165[] scopeStates) + { + SendScopeStates(scopeStates); + base.OpticCalibrationSwitchUp(scopeStates); + } + + public override void OpticCalibrationSwitchDown(GStruct165[] scopeStates) + { + SendScopeStates(scopeStates); + base.OpticCalibrationSwitchDown(scopeStates); + } + + private void SendScopeStates(GStruct165[] scopeStates) { if (!CurrentOperation.CanChangeScopeStates(scopeStates)) { @@ -381,8 +398,6 @@ public override void SetScopeMode(GStruct165[] scopeStates) GStruct165 = scopeStates } }); - - base.SetScopeMode(scopeStates); } public override void ShotMisfired(BulletClass ammo, Weapon.EMalfunctionState malfunctionState, float overheat)