Skip to content

Commit

Permalink
add cleansuit scientist
Browse files Browse the repository at this point in the history
  • Loading branch information
wootguy committed Dec 5, 2020
1 parent 2f27385 commit 6bd2347
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions dlls/monster/CScientist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ class CScientist : public CTalkSquadMonster
float m_painTime;
float m_healTime;
float m_fearTime;

const char* defaultModel;
};

LINK_ENTITY_TO_CLASS( monster_scientist, CScientist );
LINK_ENTITY_TO_CLASS( monster_cleansuit_scientist, CScientist );

TYPEDESCRIPTION CScientist::m_SaveData[] =
{
Expand Down Expand Up @@ -641,7 +644,7 @@ void CScientist :: Spawn( void )
{
Precache( );

SET_MODEL(ENT(pev), "models/scientist.mdl");
SET_MODEL(ENT(pev), defaultModel);
UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX);

pev->solid = SOLID_SLIDEBOX;
Expand Down Expand Up @@ -677,7 +680,9 @@ void CScientist :: Spawn( void )
//=========================================================
void CScientist :: Precache( void )
{
PRECACHE_MODEL("models/scientist.mdl");
defaultModel = FClassnameIs(pev, "monster_scientist") ? "models/scientist.mdl" : "models/cleansuit_scientist.mdl";

PRECACHE_MODEL(defaultModel);
PRECACHE_SOUND("scientist/sci_pain1.wav");
PRECACHE_SOUND("scientist/sci_pain2.wav");
PRECACHE_SOUND("scientist/sci_pain3.wav");
Expand Down
2 changes: 1 addition & 1 deletion sevenkewp

0 comments on commit 6bd2347

Please sign in to comment.