From 627f182571c82da7a5383aa7da270048c734655d Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:16:13 +0500 Subject: [PATCH] Fix civilian's voice pitch selection. --- dlls/hunger/civilian.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/hunger/civilian.cpp b/dlls/hunger/civilian.cpp index d863bf43..68154a3a 100644 --- a/dlls/hunger/civilian.cpp +++ b/dlls/hunger/civilian.cpp @@ -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 ); }