Skip to content

You can now change the headshot damage multiplier for combine soldiers in console #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sp/src/game/server/hl2/npc_combines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}

Expand Down