From cbff1ee44e5493d3b38fbf1eb11863670704be3b Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sun, 7 Aug 2022 14:24:42 +0300 Subject: [PATCH] Apply sci pitch fix for cleansuit scientist. Fix pitch calculation for scientist (#311) --- dlls/gearbox/cleansuit_scientist.cpp | 10 +++++----- dlls/scientist.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/gearbox/cleansuit_scientist.cpp b/dlls/gearbox/cleansuit_scientist.cpp index d3908187..15ce5d9e 100644 --- a/dlls/gearbox/cleansuit_scientist.cpp +++ b/dlls/gearbox/cleansuit_scientist.cpp @@ -43,6 +43,11 @@ LINK_ENTITY_TO_CLASS(monster_cleansuit_scientist, CCleansuitScientist); //========================================================= void CCleansuitScientist::Spawn(void) { + 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/cleansuit_scientist.mdl"); @@ -63,11 +68,6 @@ void CCleansuitScientist::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; diff --git a/dlls/scientist.cpp b/dlls/scientist.cpp index fc0b831c..b2ac6722 100644 --- a/dlls/scientist.cpp +++ b/dlls/scientist.cpp @@ -644,7 +644,7 @@ void CScientist::TalkInit() m_szGrp[TLK_MORTAL] = "SC_MORTAL"; // get voice for head - switch( pev->body % NUM_SCIENTIST_HEADS ) + switch( pev->body % NUM_SCIENTIST_HEADS_OPFOR ) { default: case HEAD_GLASSES: