Skip to content

Commit

Permalink
Release Contingency v0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad-Melnichuk committed Aug 29, 2022
1 parent 2aa66de commit 16a1228
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ The complete game source code of Contingency, a Half-Life 2 modification built u
* Fast zombie's health is now 40, to get dropped from one .357 Magnum shot.
* Players' weapons damage values now are 5 for SMG1, 8 for 9mm pistol(s) and Alyx's gun, 10 for AR2, 15 for the turret.
* SMG1, 9mm pistol(s) and AR2s deal the same damage when wielded by enemies and players.
* Both players and NPCs take 4x damage from headshots.
* Both players and NPCs take 4x damage from headshots.

### v 0.1.8

**Balance improvements in binaries**

* Fast headcrab now has 10 hp to die from one AR2 shot or two shots from other automatic weapons. Didn't notice before that in code it had read the classic headcrab health entry from skill.cfg.
* Fast zombie health has been de-hardcoded and brought to skill.cfg.
4 changes: 3 additions & 1 deletion src/game/server/hl2/npc_fastzombie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ int AE_FASTZOMBIE_VEHICLE_SS_DIE; // Killed while doing scripted sequence on veh

#endif // HL2_EPISODIC

ConVar sk_zombie_fast_health( "sk_zombie_fast_health","0");

enum
{
COND_FASTZOMBIE_CLIMB_TOUCH = LAST_BASE_ZOMBIE_CONDITION,
Expand Down Expand Up @@ -670,7 +672,7 @@ void CFastZombie::Spawn( void )
SetBloodColor( BLOOD_COLOR_YELLOW );
#endif // HL2_EPISODIC

m_iHealth = 40;
m_iHealth = sk_zombie_fast_health.GetFloat();
m_flFieldOfView = 0.2;

CapabilitiesClear();
Expand Down
14 changes: 7 additions & 7 deletions src/game/server/hl2/npc_headcrab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2566,7 +2566,7 @@ void CFastHeadcrab::Spawn( void )

BaseClass::Spawn();

m_iHealth = sk_headcrab_health.GetFloat();
m_iHealth = sk_headcrab_fast_health.GetFloat();

m_iRunMode = HEADCRAB_RUNMODE_IDLE;
m_flPauseTime = 999999;
Expand Down Expand Up @@ -3268,13 +3268,13 @@ void CBlackHeadcrab::TouchDamage( CBaseEntity *pOther )
if ( CalcDamageInfo( &info ) >= pOther->m_iHealth )
info.SetDamage( pOther->m_iHealth - 1 );

pOther->TakeDamage( info );
// pOther->TakeDamage( info );

if ( pOther->IsAlive() && pOther->m_iHealth > 1)
{
// Episodic change to avoid NPCs dying too quickly from poison bites
if ( hl2_episodic.GetBool() )
{
// if ( hl2_episodic.GetBool() )
// {
if ( pOther->IsPlayer() )
{
// That didn't finish them. Take them down to one point with poison damage. It'll heal.
Expand All @@ -3285,12 +3285,12 @@ void CBlackHeadcrab::TouchDamage( CBaseEntity *pOther )
// Just take some amount of slash damage instead
pOther->TakeDamage( CTakeDamageInfo( this, this, sk_headcrab_poison_npc_damage.GetFloat(), DMG_SLASH ) );
}
}
else
// }
/*else
{
// That didn't finish them. Take them down to one point with poison damage. It'll heal.
pOther->TakeDamage( CTakeDamageInfo( this, this, pOther->m_iHealth - 1, DMG_POISON ) );
}
}*/
}
}
}
Expand Down

0 comments on commit 16a1228

Please sign in to comment.