|
|
|
@ -119,6 +119,7 @@ private:
@@ -119,6 +119,7 @@ private:
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_scientist, CScientist ) |
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_cleansuit_scientist, CScientist ) |
|
|
|
|
|
|
|
|
|
TYPEDESCRIPTION CScientist::m_SaveData[] = |
|
|
|
|
{ |
|
|
|
@ -639,7 +640,11 @@ void CScientist::Spawn( void )
@@ -639,7 +640,11 @@ void CScientist::Spawn( void )
|
|
|
|
|
{ |
|
|
|
|
Precache(); |
|
|
|
|
|
|
|
|
|
if( FClassnameIs( pev, "monster_cleansuit_scientist" ) ) |
|
|
|
|
SET_MODEL( ENT( pev ), "models/cleansuit_scientist.mdl" ); |
|
|
|
|
else |
|
|
|
|
SET_MODEL( ENT( pev ), "models/scientist.mdl" ); |
|
|
|
|
|
|
|
|
|
UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX ); |
|
|
|
|
|
|
|
|
|
pev->solid = SOLID_SLIDEBOX; |
|
|
|
@ -676,7 +681,11 @@ void CScientist::Spawn( void )
@@ -676,7 +681,11 @@ void CScientist::Spawn( void )
|
|
|
|
|
//=========================================================
|
|
|
|
|
void CScientist::Precache( void ) |
|
|
|
|
{ |
|
|
|
|
if( FClassnameIs( pev, "monster_cleansuit_scientist" ) ) |
|
|
|
|
PRECACHE_MODEL( "models/cleansuit_scientist.mdl" ); |
|
|
|
|
else |
|
|
|
|
PRECACHE_MODEL( "models/scientist.mdl" ); |
|
|
|
|
|
|
|
|
|
PRECACHE_SOUND( "scientist/sci_pain1.wav" ); |
|
|
|
|
PRECACHE_SOUND( "scientist/sci_pain2.wav" ); |
|
|
|
|
PRECACHE_SOUND( "scientist/sci_pain3.wav" ); |
|
|
|
@ -1053,6 +1062,9 @@ MONSTERSTATE CScientist::GetIdealState( void )
@@ -1053,6 +1062,9 @@ MONSTERSTATE CScientist::GetIdealState( void )
|
|
|
|
|
|
|
|
|
|
BOOL CScientist::CanHeal( void ) |
|
|
|
|
{ |
|
|
|
|
if( FClassnameIs( pev, "monster_cleansuit_scientist" ) ) |
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
|
|
if( ( m_healTime > gpGlobals->time ) || ( m_hTargetEnt == 0 ) || ( m_hTargetEnt->pev->health > ( m_hTargetEnt->pev->max_health * 0.5 ) ) ) |
|
|
|
|
return FALSE; |
|
|
|
|
|
|
|
|
@ -1120,15 +1132,31 @@ void CDeadScientist::KeyValue( KeyValueData *pkvd )
@@ -1120,15 +1132,31 @@ void CDeadScientist::KeyValue( KeyValueData *pkvd )
|
|
|
|
|
else |
|
|
|
|
CBaseMonster::KeyValue( pkvd ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_scientist_dead, CDeadScientist ) |
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_cleansuit_scientist_dead, CDeadScientist ) |
|
|
|
|
LINK_ENTITY_TO_CLASS( monster_civ_scientist_dead, CDeadScientist ) |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// ********** DeadScientist SPAWN **********
|
|
|
|
|
//
|
|
|
|
|
void CDeadScientist::Spawn() |
|
|
|
|
{ |
|
|
|
|
if( FClassnameIs( pev, "monster_cleansuit_scientist_dead" ) ) |
|
|
|
|
{ |
|
|
|
|
PRECACHE_MODEL( "models/cleansuit_scientist.mdl" ); |
|
|
|
|
SET_MODEL( ENT( pev ), "models/cleansuit_scientist.mdl" ); |
|
|
|
|
} |
|
|
|
|
else if( FClassnameIs( pev, "monster_civ_scientist_dead" ) ) |
|
|
|
|
{ |
|
|
|
|
PRECACHE_MODEL( "models/civ_scientist.mdl" ); |
|
|
|
|
SET_MODEL( ENT( pev ), "models/civ_scientist.mdl" ); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
PRECACHE_MODEL( "models/scientist.mdl" ); |
|
|
|
|
SET_MODEL( ENT( pev ), "models/scientist.mdl" ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
pev->effects = 0; |
|
|
|
|
pev->sequence = 0; |
|
|
|
|