From fdbf7989cc062824682fd70f79633d1f0afe2d28 Mon Sep 17 00:00:00 2001 From: cypress Date: Tue, 5 Dec 2023 13:00:34 -0500 Subject: [PATCH] SERVER: Set ADS_Offset on weapon swap, not just when deemed worthy --- source/server/player.qc | 1 + source/server/utilities/weapon_utilities.qc | 2 ++ source/server/weapons/weapon_core.qc | 6 ------ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/source/server/player.qc b/source/server/player.qc index e84fb41..4acef27 100644 --- a/source/server/player.qc +++ b/source/server/player.qc @@ -845,6 +845,7 @@ void() PlayerSpawn = self.Weapon_Name = GetWeaponName(self.weapon); self.Flash_Offset = GetWeaponFlash_Offset(self.weapon); self.Flash_Size = GetWeaponFlash_Size(self.weapon); + self.ADS_Offset = GetWeaponADSOfs_PSP(self.weapon); #endif // FTE diff --git a/source/server/utilities/weapon_utilities.qc b/source/server/utilities/weapon_utilities.qc index 59413f9..2b934bf 100644 --- a/source/server/utilities/weapon_utilities.qc +++ b/source/server/utilities/weapon_utilities.qc @@ -253,6 +253,7 @@ void Weapon_SwapWeapons(float play_animation) self.Weapon_Name = GetWeaponName(self.weapon); self.Flash_Offset = GetWeaponFlash_Offset(self.weapon); self.Flash_Size = GetWeaponFlash_Size(self.weapon); + self.ADS_Offset = GetWeaponADSOfs_PSP(self.weapon); #endif // FTE @@ -287,6 +288,7 @@ void Weapon_SetActiveInSlot(float slot, float play_first_raise) self.Weapon_Name = GetWeaponName(self.weapon); self.Flash_Offset = GetWeaponFlash_Offset(self.weapon); self.Flash_Size = GetWeaponFlash_Size(self.weapon); + self.ADS_Offset = GetWeaponADSOfs_PSP(self.weapon); #endif // FTE diff --git a/source/server/weapons/weapon_core.qc b/source/server/weapons/weapon_core.qc index 15c329f..8961161 100644 --- a/source/server/weapons/weapon_core.qc +++ b/source/server/weapons/weapon_core.qc @@ -134,12 +134,6 @@ void() W_AimIn = } else if (self.zoom) { return; } - -#ifndef FTE - - self.ADS_Offset = GetWeaponADSOfs_PSP(self.weapon); - -#endif // FTE if (self.weapon == W_KAR_SCOPE || self.weapon == W_PTRS || self.weapon == W_HEADCRACKER || self.weapon == W_PENETRATOR) {