mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 13:14:51 +00:00
Fix scientist's voice pitch selection (#292)
This commit is contained in:
parent
3b0046cb3d
commit
b69d37e30e
@ -639,6 +639,13 @@ void CScientist::HandleAnimEvent( MonsterEvent_t *pEvent )
|
||||
//=========================================================
|
||||
void CScientist::Spawn( void )
|
||||
{
|
||||
// We need to set it before precache so the right voice will be chosen
|
||||
if( pev->body == -1 )
|
||||
{
|
||||
// -1 chooses a random head
|
||||
pev->body = RANDOM_LONG( 0, NUM_SCIENTIST_HEADS - 1 );// pick a head, any head
|
||||
}
|
||||
|
||||
Precache();
|
||||
|
||||
SET_MODEL( ENT( pev ), "models/scientist.mdl" );
|
||||
@ -659,12 +666,6 @@ void CScientist::Spawn( void )
|
||||
// White hands
|
||||
pev->skin = 0;
|
||||
|
||||
if( pev->body == -1 )
|
||||
{
|
||||
// -1 chooses a random head
|
||||
pev->body = RANDOM_LONG( 0, NUM_SCIENTIST_HEADS - 1 );// pick a head, any head
|
||||
}
|
||||
|
||||
// Luther is black, make his hands black
|
||||
if( pev->body == HEAD_LUTHER )
|
||||
pev->skin = 1;
|
||||
@ -722,7 +723,7 @@ void CScientist::TalkInit()
|
||||
m_szGrp[TLK_MORTAL] = "SC_MORTAL";
|
||||
|
||||
// get voice for head
|
||||
switch( pev->body % 3 )
|
||||
switch( pev->body % NUM_SCIENTIST_HEADS )
|
||||
{
|
||||
default:
|
||||
case HEAD_GLASSES:
|
||||
|
Loading…
x
Reference in New Issue
Block a user