From 7b903076ecf753c56085369a035a58781b9f6342 Mon Sep 17 00:00:00 2001 From: "ALLEN-PC\\acj30" Date: Tue, 11 Feb 2025 09:16:29 -0600 Subject: [PATCH] Add cvar for SMG1 to use EZ1 accuracy --- sp/src/game/server/hl2/weapon_smg1.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sp/src/game/server/hl2/weapon_smg1.cpp b/sp/src/game/server/hl2/weapon_smg1.cpp index 6c7163dac14..d329e499b02 100644 --- a/sp/src/game/server/hl2/weapon_smg1.cpp +++ b/sp/src/game/server/hl2/weapon_smg1.cpp @@ -26,6 +26,10 @@ extern ConVar sk_plr_dmg_smg1_grenade; extern ConVar sk_npc_dmg_smg1_grenade; #endif +#ifdef EZ2 +ConVar weapon_smg1_use_ez1_accuracy( "weapon_smg1_use_ez1_accuracy", "0" ); +#endif + class CWeaponSMG1 : public CHLSelectFireMachineGun { DECLARE_DATADESC(); @@ -59,10 +63,12 @@ class CWeaponSMG1 : public CHLSelectFireMachineGun { #ifdef EZ1 static const Vector cone = VECTOR_CONE_2DEGREES; + return cone; #else + static const Vector coneEZ1 = VECTOR_CONE_2DEGREES; static const Vector cone = VECTOR_CONE_5DEGREES; + return weapon_smg1_use_ez1_accuracy.GetBool() ? coneEZ1 : cone; #endif - return cone; } const WeaponProficiencyInfo_t *GetProficiencyValues();