Add monster_zombie_barney, monster_zombie_soldier, monster_zombie_grunt implementations.

This commit is contained in:
Night Owl 2017-10-19 00:20:09 +05:00
parent 98bde36aac
commit c1e96c6c2e
1 changed files with 19 additions and 2 deletions

View File

@ -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,7 +240,14 @@ void CZombie::Spawn()
{
Precache();
SET_MODEL( ENT( pev ), "models/zombie.mdl" );
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 );
pev->solid = SOLID_SLIDEBOX;
@ -259,7 +269,14 @@ void CZombie::Precache()
{
size_t i;
PRECACHE_MODEL( "models/zombie.mdl" );
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++ )
PRECACHE_SOUND( pAttackHitSounds[i] );