|
|
|
@ -35,6 +35,9 @@
@@ -35,6 +35,9 @@
|
|
|
|
|
#define ZOMBIE_FLINCH_DELAY 2 // at most one flinch every n secs
|
|
|
|
|
|
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_zombie, CZombie ) |
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_zombie_barney, CZombie ) |
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_zombie_soldier, CZombie ) |
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_zombie_grunt, CZombie ) |
|
|
|
|
|
|
|
|
|
const char *CZombie::pAttackHitSounds[] = |
|
|
|
|
{ |
|
|
|
@ -237,6 +240,13 @@ void CZombie::Spawn()
@@ -237,6 +240,13 @@ void CZombie::Spawn()
|
|
|
|
|
{ |
|
|
|
|
Precache(); |
|
|
|
|
|
|
|
|
|
if( FClassnameIs( pev, "monster_zombie_barney" ) ) |
|
|
|
|
SET_MODEL( ENT( pev ), "models/zombie_barney.mdl" ); |
|
|
|
|
else if( FClassnameIs( pev, "monster_zombie_soldier" ) ) |
|
|
|
|
SET_MODEL( ENT( pev ), "models/zombie_soldier.mdl" ); |
|
|
|
|
else if( FClassnameIs( pev, "monster_zombie_grunt" ) ) |
|
|
|
|
SET_MODEL( ENT( pev ), "models/zgrunt.mdl" ); |
|
|
|
|
else |
|
|
|
|
SET_MODEL( ENT( pev ), "models/zombie.mdl" ); |
|
|
|
|
UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX ); |
|
|
|
|
|
|
|
|
@ -259,6 +269,13 @@ void CZombie::Precache()
@@ -259,6 +269,13 @@ void CZombie::Precache()
|
|
|
|
|
{ |
|
|
|
|
size_t i; |
|
|
|
|
|
|
|
|
|
if( FClassnameIs( pev, "monster_zombie_barney" ) ) |
|
|
|
|
PRECACHE_MODEL( "models/zombie_barney.mdl" ); |
|
|
|
|
else if( FClassnameIs( pev, "monster_zombie_soldier" ) ) |
|
|
|
|
PRECACHE_MODEL( "models/zombie_soldier.mdl" ); |
|
|
|
|
else if( FClassnameIs( pev, "monster_zombie_grunt" ) ) |
|
|
|
|
PRECACHE_MODEL( "models/zgrunt.mdl" ); |
|
|
|
|
else |
|
|
|
|
PRECACHE_MODEL( "models/zombie.mdl" ); |
|
|
|
|
|
|
|
|
|
for( i = 0; i < ARRAYSIZE( pAttackHitSounds ); i++ ) |
|
|
|
|