Fix civilian's voice pitch selection.

This commit is contained in:
Andrey Akhmichin 2022-11-16 10:16:13 +05:00
parent dcedc28693
commit 627f182571
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
1 changed files with 6 additions and 6 deletions

View File

@ -50,6 +50,12 @@ LINK_ENTITY_TO_CLASS( einar_civ, CEinarCivilian )
//=========================================================
void CEinarCivilian::Spawn()
{
if( pev->body == -1 )
{
// -1 chooses a random head
pev->body = RANDOM_LONG( 0, NUM_CIVILIAN_HEADS - 1 );// pick a head, any head
}
Precache();
SET_MODEL( ENT( pev ), "models/civ.mdl" );
@ -68,12 +74,6 @@ void CEinarCivilian::Spawn()
m_afCapability = bits_CAP_HEAR | bits_CAP_TURN_HEAD | bits_CAP_OPEN_DOORS | bits_CAP_AUTO_DOORS | bits_CAP_USE;
if( pev->body == -1 )
{
// -1 chooses a random head
pev->body = RANDOM_LONG( 0, NUM_CIVILIAN_HEADS - 1 );// pick a head, any head
}
MonsterInit();
SetUse( &CEinarCivilian::FollowerUse );
}