Serious-Engine/Sources/EntitiesMP/Scorpman.cpp
2016-03-11 15:57:17 +02:00

998 lines
43 KiB
C++

/*
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
*/
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
#include "StdH.h"
#include "Models/Enemies/Scorpman/Scorpman.h"
#include "Models/Enemies/Scorpman/Gun.h"
#include <EntitiesMP/Scorpman.h>
#include <EntitiesMP/Scorpman_tables.h>
#line 21 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
#define GUN_X 0.375f
#define GUN_Y 0.6f
#define GUN_Z -1.85f
#define STRETCH_SOLDIER 2
#define STRETCH_GENERAL 3
#define STRETCH_MONSTER 4
// info structure
static EntityInfo eiScorpman = {
EIBT_FLESH, 1000.0f,
0, 1.6f*STRETCH_SOLDIER, 0, // source (eyes)
0.0f, 1.0f*STRETCH_SOLDIER, 0.0f, // target (body)
};
static EntityInfo eiScorpmanGeneral = {
EIBT_FLESH, 1500.0f,
0, 1.6f*STRETCH_GENERAL, 0, // source (eyes)
0.0f, 1.0f*STRETCH_GENERAL, 0.0f, // target (body)
};
static EntityInfo eiScorpmanMonster = {
EIBT_FLESH, 2000.0f,
0, 1.6f*STRETCH_MONSTER, 0, // source (eyes)
0.0f, 1.0f*STRETCH_MONSTER, 0.0f, // target (body)
};
#define LIGHT_ANIM_FIRE 3
#define LIGHT_ANIM_NONE 5
void CScorpman::SetDefaultProperties(void) {
m_smtType = SMT_SOLDIER ;
m_bFireBulletCount = 0;
m_iSpawnEffect = 0;
m_fFireTime = 0.0f;
m_aoLightAnimation.SetData(NULL);
m_bSleeping = FALSE ;
CEnemyBase::SetDefaultProperties();
}
CTString CScorpman::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath)
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CTString str ;
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(eDeath . eLastDamage . dmtType == DMT_CLOSERANGE ){
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
str . PrintF (TRANS ("%s was stabbed by an Arachnoid") , strPlayerName );
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else {
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
str . PrintF (TRANS ("An Arachnoid poured lead into %s") , strPlayerName );
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return str ;
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::Precache(void) {
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CEnemyBase :: Precache ();
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrecacheModel (MODEL_FLARE );
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrecacheSound (SOUND_IDLE );
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrecacheSound (SOUND_SIGHT );
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrecacheSound (SOUND_WOUND );
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrecacheSound (SOUND_FIRE );
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrecacheSound (SOUND_KICK );
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrecacheSound (SOUND_DEATH );
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::Read_t(CTStream * istr) {
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CEnemyBase :: Read_t (istr );
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetupLightSource ();
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
BOOL CScorpman::FillEntityStatistics(EntityStats * pes)
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CEnemyBase :: FillEntityStatistics (pes );
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
switch(m_smtType ){
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_MONSTER : {pes -> es_strName += " Monster";}break ;
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_GENERAL : {pes -> es_strName += " General";}break ;
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_SOLDIER : {pes -> es_strName += " Soldier";}break ;
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE ;
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
const CTFileName & CScorpman::GetComputerMessageName(void)const {
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
static DECLARE_CTFILENAME (fnmGeneral , "Data\\Messages\\Enemies\\ScorpmanGeneral.txt");
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
static DECLARE_CTFILENAME (fnmSoldier , "Data\\Messages\\Enemies\\ScorpmanSoldier.txt");
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
switch(m_smtType ){
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
default : ASSERT (FALSE );
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_MONSTER :
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_GENERAL : return fnmGeneral ;
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_SOLDIER : return fnmSoldier ;
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CLightSource * CScorpman::GetLightSource(void) {
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(! IsPredictor ()){
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return & m_lsLightSource ;
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else {
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return NULL ;
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
BOOL CScorpman::ForcesCannonballToExplode(void)
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_smtType != SMT_SOLDIER ){
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE ;
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return CEnemyBase :: ForcesCannonballToExplode ();
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::SetupLightSource(void) {
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CLightSource lsNew ;
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
lsNew . ls_ulFlags = LSF_NONPERSISTENT | LSF_DYNAMIC ;
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
lsNew . ls_rHotSpot = 2.0f;
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
lsNew . ls_rFallOff = 8.0f;
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
lsNew . ls_colColor = RGBToColor (128 , 128 , 128);
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
lsNew . ls_plftLensFlare = NULL ;
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
lsNew . ls_ubPolygonalMask = 0;
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
lsNew . ls_paoLightAnimation = & m_aoLightAnimation ;
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_lsLightSource . ls_penEntity = this ;
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_lsLightSource . SetLightSource (lsNew );
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::PlayLightAnim(INDEX iAnim,ULONG ulFlags) {
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_aoLightAnimation . GetData () != NULL ){
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_aoLightAnimation . PlayAnim (iAnim , ulFlags );
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::MinigunOn(void)
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlayLightAnim (LIGHT_ANIM_FIRE , AOF_LOOPING );
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CModelObject * pmoGun = & GetModelObject () -> GetAttachmentModel (SCORPMAN_ATTACHMENT_MINIGUN ) ->
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
amo_moModelObject ;
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
pmoGun -> PlayAnim (GUN_ANIM_FIRE , AOF_LOOPING );
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
AddAttachmentToModel (this , * pmoGun , GUN_ATTACHMENT_FLAME , MODEL_FLARE , TEXTURE_GUN , 0 , 0 , 0);
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
switch(m_smtType ){
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_SOLDIER : pmoGun -> StretchModel (FLOAT3D (2.0f , 2.0f , 2.0f));break ;
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_GENERAL : pmoGun -> StretchModel (FLOAT3D (3.0f , 3.0f , 3.0f));break ;
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_MONSTER : pmoGun -> StretchModel (FLOAT3D (4.0f , 4.0f , 4.0f));break ;
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::MinigunOff(void)
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlayLightAnim (LIGHT_ANIM_NONE , 0);
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CModelObject * pmoGun = & GetModelObject () -> GetAttachmentModel (SCORPMAN_ATTACHMENT_MINIGUN ) ->
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
amo_moModelObject ;
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
pmoGun -> PlayAnim (GUN_ANIM_IDLE , AOF_LOOPING );
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
pmoGun -> RemoveAttachmentModel (GUN_ATTACHMENT_FLAME );
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void * CScorpman::GetEntityInfo(void) {
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_smtType == SMT_MONSTER ){
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return & eiScorpmanMonster ;
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else if(m_smtType == SMT_GENERAL ){
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return & eiScorpmanGeneral ;
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else {
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return & eiScorpman ;
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(! IsOfClass (penInflictor , "Scorpman")){
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 227 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
INDEX CScorpman::AnimForDamage(FLOAT fDamage) {
#line 228 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
INDEX iAnim ;
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
switch(IRnd () % 3){
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case 0: iAnim = SCORPMAN_ANIM_WOUND01 ;break ;
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case 1: iAnim = SCORPMAN_ANIM_WOUND02 ;break ;
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case 2: iAnim = SCORPMAN_ANIM_WOUND03 ;break ;
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
default : ASSERTALWAYS ("Scorpman unknown damage");
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (iAnim , 0);
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
MinigunOff ();
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return iAnim ;
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
INDEX CScorpman::AnimForDeath(void) {
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_DEATH , 0);
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
MinigunOff ();
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return SCORPMAN_ANIM_DEATH ;
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 247 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
FLOAT CScorpman::WaitForDust(FLOAT3D & vStretch) {
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(GetModelObject () -> GetAnim () == SCORPMAN_ANIM_DEATH )
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
vStretch = FLOAT3D (1 , 1 , 1) * 1.5f;
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return 1.3f;
#line 252 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return - 1.0f;
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::DeathNotify(void) {
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
ChangeCollisionBoxIndexWhenPossible (SCORPMAN_COLLISION_BOX_DEATH );
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetCollisionFlags (ECF_MODEL );
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::StandingAnim(void) {
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART );
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::WalkingAnim(void) {
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_WALK , AOF_LOOPING | AOF_NORESTART );
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::RunningAnim(void) {
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_WALK , AOF_LOOPING | AOF_NORESTART );
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::RotatingAnim(void) {
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_WALK , AOF_LOOPING | AOF_NORESTART );
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::IdleSound(void) {
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlaySound (m_soSound , SOUND_IDLE , SOF_3D );
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::SightSound(void) {
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlaySound (m_soSound , SOUND_SIGHT , SOF_3D );
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::WoundSound(void) {
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlaySound (m_soSound , SOUND_WOUND , SOF_3D );
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::DeathSound(void) {
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlaySound (m_soSound , SOUND_DEATH , SOF_3D );
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
BOOL CScorpman::CanFireAtPlayer(void)
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
FLOAT3D vSource , vTarget ;
#line 297 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
GetPositionCastRay (this , m_penEnemy , vSource , vTarget );
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CPlacement3D plBullet ;
#line 301 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector = FLOAT3D (GUN_X , GUN_Y , 0);
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_smtType == SMT_MONSTER ){
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector *= STRETCH_MONSTER ;
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else if(m_smtType == SMT_GENERAL ){
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector *= STRETCH_GENERAL ;
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else {
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector *= STRETCH_SOLDIER ;
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . RelativeToAbsolute (GetPlacement ());
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
vSource = plBullet . pl_PositionVector ;
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CCastRay crRay (this , vSource , vTarget );
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
crRay . cr_ttHitModels = CCastRay :: TT_NONE ;
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
crRay . cr_bHitTranslucentPortals = FALSE ;
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
en_pwoWorld -> CastRay (crRay );
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return (crRay . cr_penHit == NULL );
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::PrepareBullet(FLOAT fDamage) {
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CPlacement3D plBullet ;
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_OrientationAngle = ANGLE3D (0 , 0 , 0);
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector = FLOAT3D (GUN_X , GUN_Y , 0);
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_smtType == SMT_MONSTER ){
#line 331 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector *= STRETCH_MONSTER ;
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else if(m_smtType == SMT_GENERAL ){
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector *= STRETCH_GENERAL ;
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else {
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . pl_PositionVector *= STRETCH_SOLDIER ;
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
plBullet . RelativeToAbsolute (GetPlacement ());
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
penBullet = CreateEntity (plBullet , CLASS_BULLET );
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
EBulletInit eInit ;
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
eInit . penOwner = this ;
#line 343 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
eInit . fDamage = fDamage ;
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
penBullet -> Initialize (eInit );
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::FireBullet(void) {
#line 350 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_bFireBulletCount ++;
#line 351 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_bFireBulletCount > 1){m_bFireBulletCount = 0;}
#line 352 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_bFireBulletCount == 1){return ;}
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PrepareBullet (3.0f);
#line 355 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
((CBullet &) * penBullet ) . CalcTarget (m_penEnemy , 250);
#line 356 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
((CBullet &) * penBullet ) . CalcJitterTarget (10);
#line 357 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
((CBullet &) * penBullet ) . LaunchBullet (TRUE , TRUE , TRUE );
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
((CBullet &) * penBullet ) . DestroyBullet ();
#line 359 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 363 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
void CScorpman::EnemyPostInit(void)
#line 364 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
{
#line 366 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_soSound . Set3DParameters (160.0f , 50.0f , 1.0f , 1.0f);
#line 367 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
BOOL CScorpman::
#line 374 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Fire(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CScorpman_Fire
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CScorpman::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(! CanFireAtPlayer ()){
#line 376 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Return(STATE_CURRENT,EReturn ());
#line 376 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE;
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
switch(m_smtType ){
#line 381 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_MONSTER :
#line 382 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fDamageConfused = 200;
#line 383 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fFireTime = 8.0f;
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
break ;
#line 385 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_GENERAL :
#line 386 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fDamageConfused = 100;
#line 387 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fFireTime = 4.0f;
#line 388 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
break ;
#line 389 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_SOLDIER :
#line 390 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fDamageConfused = 50;
#line 391 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fFireTime = 2.0f;
#line 392 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
break ;
#line 393 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 394 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(GetSP () -> sp_gdGameDifficulty <= CSessionProperties :: GD_EASY ){
#line 395 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fFireTime *= 0.5f;
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 398 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_STANDTOFIRE , 0);
#line 399 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fLockOnEnemyTime = GetModelObject () -> GetAnimLength (SCORPMAN_ANIM_STANDTOFIRE ) + 0.5f + FRnd () / 3;
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
STATE_CEnemyBase_LockOnEnemy, FALSE;
Jump(STATE_CURRENT, 0x01320001, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x01320001_Fire_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320001
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_LockOnEnemy, FALSE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01320002, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CScorpman::H0x01320002_Fire_02(const CEntityEvent &__eeInput){
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320002
const EReturn&__e= (EReturn&)__eeInput;
;
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_iSpawnEffect = 0;
#line 404 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fFireTime += _pTimer -> CurrentTick ();
#line 405 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_bFireBulletCount = 0;
#line 406 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlaySound (m_soSound , SOUND_FIRE , SOF_3D | SOF_LOOP );
#line 407 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
MinigunOn ();
#line 409 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Jump(STATE_CURRENT,0x01320005, FALSE, EInternal());return TRUE;}BOOL CScorpman::H0x01320005_Fire_05(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320005
if(!(m_fFireTime > _pTimer -> CurrentTick ())){ Jump(STATE_CURRENT,0x01320006, FALSE, EInternal());return TRUE;}
#line 410 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fMoveFrequency = 0.1f;
#line 411 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTimerAfter(m_fMoveFrequency );
Jump(STATE_CURRENT, 0x01320003, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x01320003_Fire_03(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320003
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
#line 414 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
AddToFuss ();
#line 416 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
FireBullet ();
#line 417 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_vDesiredPosition = m_penEnemy -> GetPlacement () . pl_PositionVector ;
#line 419 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(! IsInPlaneFrustum (m_penEnemy , CosFast (5.0f))){
#line 420 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fMoveSpeed = 0.0f;
#line 421 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_aRotateSpeed = 4000.0f;
#line 422 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_WALK_AND_FIRE , AOF_LOOPING | AOF_NORESTART );
#line 424 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else {
#line 425 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fMoveSpeed = 0.0f;
#line 426 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_aRotateSpeed = 0.0f;
#line 427 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_FIRE_MINIGUN , AOF_LOOPING | AOF_NORESTART );
#line 428 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 430 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetDesiredMovement ();
#line 431 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE;
#line 432 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
UnsetTimer();Jump(STATE_CURRENT,0x01320004, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break;
#line 434 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}return TRUE;}BOOL CScorpman::H0x01320004_Fire_04(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320004
Jump(STATE_CURRENT,0x01320005, FALSE, EInternal());return TRUE;
#line 435 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}BOOL CScorpman::H0x01320006_Fire_06(const CEntityEvent &__eeInput) {
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320006
#line 436 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_soSound . Stop ();
#line 437 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
MinigunOff ();
#line 439 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fShootTime = _pTimer -> CurrentTick () + m_fAttackFireTime * (1.0f + FRnd () / 3.0f);
#line 442 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_FIRETOSTAND , 0);
#line 443 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTimerAfter(GetModelObject () -> GetAnimLength (SCORPMAN_ANIM_FIRETOSTAND ));
Jump(STATE_CURRENT, 0x01320007, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x01320007_Fire_07(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320007
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01320008, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CScorpman::H0x01320008_Fire_08(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320008
;
#line 445 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
MaybeSwitchToAnotherPlayer ();
#line 448 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Return(STATE_CURRENT,EReturn ());
#line 448 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CScorpman::
#line 452 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Hit(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CScorpman_Hit
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CScorpman::Hit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 454 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_SPIKEHIT , 0);
#line 455 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTimerAfter(0.5f);
Jump(STATE_CURRENT, 0x0132000a, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x0132000a_Hit_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x0132000a
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0132000b, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CScorpman::H0x0132000b_Hit_02(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x0132000b
;
#line 456 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PlaySound (m_soSound , SOUND_KICK , SOF_3D );
#line 457 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(CalcDist (m_penEnemy ) < m_fCloseDistance ){
#line 458 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
FLOAT3D vDirection = m_penEnemy -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ;
#line 459 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
vDirection . Normalize ();
#line 460 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_smtType == SMT_MONSTER ){
#line 461 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
InflictDirectDamage (m_penEnemy , this , DMT_CLOSERANGE , 80.0f , FLOAT3D (0 , 0 , 0) , vDirection );
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else if(m_smtType == SMT_GENERAL ){
#line 463 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
InflictDirectDamage (m_penEnemy , this , DMT_CLOSERANGE , 40.0f , FLOAT3D (0 , 0 , 0) , vDirection );
#line 464 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}else {
#line 465 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
InflictDirectDamage (m_penEnemy , this , DMT_CLOSERANGE , 20.0f , FLOAT3D (0 , 0 , 0) , vDirection );
#line 466 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 467 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 468 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTimerAfter(0.3f);
Jump(STATE_CURRENT, 0x0132000c, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x0132000c_Hit_03(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x0132000c
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0132000d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CScorpman::H0x0132000d_Hit_04(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x0132000d
;
#line 469 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
MaybeSwitchToAnotherPlayer ();
#line 470 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Return(STATE_CURRENT,EReturn ());
#line 470 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CScorpman::
#line 473 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Sleep(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CScorpman_Sleep
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CScorpman::Sleep expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 476 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_SLEEP , AOF_LOOPING );
#line 478 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTimerAt(THINKTIME_NEVER);
Jump(STATE_CURRENT, 0x0132000f, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x0132000f_Sleep_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x0132000f
switch(__eeInput.ee_slEvent){case(EVENTCODE_ETrigger):{const ETrigger&eTrigger= (ETrigger&)__eeInput;
#line 482 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTargetSoft (eTrigger . penCaused );
#line 484 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Jump(STATE_CURRENT, STATE_CScorpman_WakeUp, TRUE, EVoid());return TRUE;
#line 485 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&eDamage= (EDamage&)__eeInput;
#line 489 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Jump(STATE_CURRENT, STATE_CScorpman_WakeUp, TRUE, EVoid());return TRUE;
#line 490 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}ASSERT(FALSE);break;default:{
#line 492 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE;
#line 493 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}ASSERT(FALSE);break;
#line 494 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}return TRUE;}BOOL CScorpman::H0x01320010_Sleep_02(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320010
ASSERT(FALSE); return TRUE;};BOOL CScorpman::
#line 497 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
WakeUp(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CScorpman_WakeUp
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CScorpman::WakeUp expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 500 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SightSound ();
#line 501 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
StartModelAnim (SCORPMAN_ANIM_WAKEUP , 0);
#line 502 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTimerAfter(GetModelObject () -> GetCurrentAnimLength ());
Jump(STATE_CURRENT, 0x01320012, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x01320012_WakeUp_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320012
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01320013, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CScorpman::H0x01320013_WakeUp_02(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320013
;
#line 505 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SendToTarget (m_penDeathTarget , m_eetDeathType );
#line 507 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Return(STATE_CURRENT,EReturn ());
#line 507 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CScorpman::
#line 511 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
PreMainLoop(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CScorpman_PreMainLoop
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CScorpman::PreMainLoop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 514 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(!(m_bSleeping )){ Jump(STATE_CURRENT,0x01320017, FALSE, EInternal());return TRUE;}
#line 515 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_bSleeping = FALSE ;
#line 517 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetTimerAt(THINKTIME_NEVER);
Jump(STATE_CURRENT, 0x01320015, FALSE, EBegin());return TRUE;}BOOL CScorpman::H0x01320015_PreMainLoop_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320015
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
#line 519 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Call(STATE_CURRENT, STATE_CScorpman_Sleep, TRUE, EVoid());return TRUE;
#line 520 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}ASSERT(FALSE);break;case(EVENTCODE_EReturn):{const EReturn&e= (EReturn&)__eeInput;
#line 522 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
UnsetTimer();Jump(STATE_CURRENT,0x01320016, FALSE, EInternal());return TRUE;
#line 523 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&eDeath= (EDeath&)__eeInput;
#line 527 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Jump(STATE_CURRENT, STATE_CEnemyBase_Die, FALSE, eDeath );return TRUE;
#line 528 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}ASSERT(FALSE);break;default: return FALSE; break;
#line 529 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}return TRUE;}BOOL CScorpman::H0x01320016_PreMainLoop_02(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320016
Jump(STATE_CURRENT,0x01320017, FALSE, EInternal());return TRUE;}BOOL CScorpman::H0x01320017_PreMainLoop_03(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01320017
#line 531 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Return(STATE_CURRENT,EReturn ());
#line 531 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CScorpman::
#line 537 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Main(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CScorpman_Main
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CScorpman::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 538 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
if(m_smtType == SMT_MONSTER ){
#line 539 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_smtType = SMT_GENERAL ;
#line 540 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 543 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
InitAsModel ();
#line 544 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetPhysicsFlags (EPF_MODEL_WALKING | EPF_HASLUNGS );
#line 545 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetCollisionFlags (ECF_MODEL );
#line 546 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetFlags (GetFlags () | ENF_ALIVE );
#line 547 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
en_tmMaxHoldBreath = 25.0f;
#line 548 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
en_fDensity = 3000.0f;
#line 551 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetModel (MODEL_SCORPMAN );
#line 552 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
switch(m_smtType ){
#line 553 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_SOLDIER :
#line 555 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetModelMainTexture (TEXTURE_SOLDIER );
#line 556 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetModelSpecularTexture (TEXTURE_SPECULAR );
#line 557 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetHealth (300.0f);
#line 558 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fMaxHealth = 300.0f;
#line 560 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fDamageWounded = 200.0f;
#line 561 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fBlowUpAmount = 1E10f;
#line 562 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fBodyParts = 30;
#line 564 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fAttackDistance = 200.0f;
#line 565 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fCloseDistance = 5.0f;
#line 566 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fStopDistance = 4.5f;
#line 567 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fAttackFireTime = 0.5f;
#line 568 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fCloseFireTime = 1.0f;
#line 569 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fIgnoreRange = 350.0f;
#line 570 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_iScore = 1000;
#line 571 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
break ;
#line 573 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_GENERAL :
#line 575 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetModelMainTexture (TEXTURE_GENERAL );
#line 576 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetModelSpecularTexture (TEXTURE_SPECULAR );
#line 577 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetHealth (600.0f);
#line 578 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fMaxHealth = 600.0f;
#line 580 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fDamageWounded = 400.0f;
#line 581 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fBlowUpAmount = 1E10f;
#line 582 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fBodyParts = 30;
#line 584 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fAttackDistance = 200.0f;
#line 585 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fCloseDistance = 5.0f;
#line 586 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fStopDistance = 4.5f;
#line 587 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fAttackFireTime = 2.0f;
#line 588 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fCloseFireTime = 1.0f;
#line 589 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fIgnoreRange = 350.0f;
#line 590 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_iScore = 5000;
#line 591 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
break ;
#line 593 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_MONSTER :
#line 595 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetModelMainTexture (TEXTURE_GENERAL );
#line 596 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetModelSpecularTexture (TEXTURE_SPECULAR );
#line 597 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetHealth (1200.0f);
#line 598 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fMaxHealth = 1200.0f;
#line 600 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fDamageWounded = 800.0f;
#line 601 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fBlowUpAmount = 1E10f;
#line 602 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fBodyParts = 60;
#line 604 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fAttackDistance = 250.0f;
#line 605 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fCloseDistance = 11.0f;
#line 606 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fStopDistance = 9.0f;
#line 607 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fAttackFireTime = 2.0f;
#line 608 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fCloseFireTime = 1.0f;
#line 609 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fIgnoreRange = 500.0f;
#line 610 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_iScore = 10000;
#line 611 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
break ;
#line 612 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 614 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
AddAttachment (SCORPMAN_ATTACHMENT_MINIGUN , MODEL_GUN , TEXTURE_GUN );
#line 617 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
switch(m_smtType ){
#line 618 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_SOLDIER : GetModelObject () -> StretchModel (FLOAT3D (1.0f , 1.0f , 1.0f) * STRETCH_SOLDIER );break ;
#line 619 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_GENERAL : GetModelObject () -> StretchModel (FLOAT3D (1.0f , 1.0f , 1.0f) * STRETCH_GENERAL );break ;
#line 620 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
case SMT_MONSTER : GetModelObject () -> StretchModel (FLOAT3D (1.0f , 1.0f , 1.0f) * STRETCH_MONSTER );break ;
#line 621 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 623 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
ModelChangeNotify ();
#line 626 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fWalkSpeed = FRnd () + 1.5f;
#line 627 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_aWalkRotateSpeed = AngleDeg (FRnd () * 20.0f + 550.0f);
#line 628 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fAttackRunSpeed = FRnd () * 1.5f + 4.5f;
#line 629 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_aAttackRotateSpeed = AngleDeg (FRnd () * 50.0f + 275.0f);
#line 630 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_fCloseRunSpeed = FRnd () * 1.5f + 4.5f;
#line 631 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_aCloseRotateSpeed = AngleDeg (FRnd () * 50.0f + 275.0f);
#line 634 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
CEnemyBase :: SizeModel ();
#line 636 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
SetupLightSource ();
#line 638 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
try {
#line 639 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
m_aoLightAnimation . SetData_t (CTFILENAME ("Animations\\BasicEffects.ani"));
#line 640 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}catch (char * strError ){
#line 641 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
WarningMessage (TRANS ("Cannot load Animations\\BasicEffects.ani: %s") , strError );
#line 642 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
}
#line 643 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
MinigunOff ();
#line 646 "D:/SE1_GPL/Sources/EntitiesMP/Scorpman.es"
Jump(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};