From 93efcbbcfd703eaede8d73365f08abd3dc6ddcee Mon Sep 17 00:00:00 2001 From: Wikot235 <149392035+Wikot235@users.noreply.github.com> Date: Sat, 24 May 2025 17:38:36 +0200 Subject: [PATCH] Headshot damage multiplier cvar for npc_combine_s (#420) --- sp/src/game/server/hl2/npc_combines.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sp/src/game/server/hl2/npc_combines.cpp b/sp/src/game/server/hl2/npc_combines.cpp index be85d895..61f8156d 100644 --- a/sp/src/game/server/hl2/npc_combines.cpp +++ b/sp/src/game/server/hl2/npc_combines.cpp @@ -38,6 +38,11 @@ ConVar sk_combine_guard_kick( "sk_combine_guard_kick", "0"); ConVar combine_guard_spawn_health( "combine_guard_spawn_health", "1" ); extern ConVar sk_plr_dmg_buckshot; + +#ifdef MAPBASE + ConVar sk_combine_head_dmg_multiplier( "sk_combine_head_dmg_multiplier", "2" ); +#endif + extern ConVar sk_plr_num_shotgun_pellets; //Whether or not the combine should spawn health on death @@ -222,8 +227,14 @@ float CNPC_CombineS::GetHitgroupDamageMultiplier( int iHitGroup, const CTakeDama { case HITGROUP_HEAD: { + +#ifdef MAPBASE + // Now you can change the multiplier of headshot damage in console! + return sk_combine_head_dmg_multiplier.GetFloat(); +#else // Soldiers take double headshot damage return 2.0f; +#endif } }