mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 12:15:53 +01:00
753 lines
35 KiB
C++
753 lines
35 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
//#include "ModelsMP/Enemies/Grunt/Grunt.h"
|
||
|
|
||
|
#include <EntitiesMP/GruntSka.h>
|
||
|
#include <EntitiesMP/GruntSka_tables.h>
|
||
|
#line 17 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
|
||
|
#define STRETCH_SOLDIER 1.2f
|
||
|
#define STRETCH_COMMANDER 1.4f
|
||
|
|
||
|
// info structure
|
||
|
static EntityInfo eiGruntSoldier = {
|
||
|
EIBT_FLESH, 200.0f,
|
||
|
0.0f, 1.9f*STRETCH_SOLDIER, 0.0f, // source (eyes)
|
||
|
0.0f, 1.3f*STRETCH_SOLDIER, 0.0f, // target (body)
|
||
|
};
|
||
|
|
||
|
static EntityInfo eiGruntCommander = {
|
||
|
EIBT_FLESH, 250.0f,
|
||
|
0.0f, 1.9f*STRETCH_COMMANDER, 0.0f, // source (eyes)
|
||
|
0.0f, 1.3f*STRETCH_COMMANDER, 0.0f, // target (body)
|
||
|
};
|
||
|
|
||
|
#define FIREPOS_SOLDIER FLOAT3D(0.07f, 1.36f, -0.78f)*STRETCH_SOLDIER
|
||
|
#define FIREPOS_COMMANDER_UP FLOAT3D(0.09f, 1.45f, -0.62f)*STRETCH_COMMANDER
|
||
|
#define FIREPOS_COMMANDER_DN FLOAT3D(0.10f, 1.30f, -0.60f)*STRETCH_COMMANDER
|
||
|
|
||
|
#define COMANDER_SMC_MODEL "ModelsSKA\\Enemies\\Grunt\\Commander.smc"
|
||
|
#define SOLIDER_SMC_MODEL "ModelsSKA\\Enemies\\Grunt\\Grunt.smc"
|
||
|
|
||
|
#define GRUNT_MESH
|
||
|
#define GRUNT_SKELETON
|
||
|
#define GRUNT_ANIMSET
|
||
|
#define GRUNT_TEXTURE
|
||
|
|
||
|
#define CLEAR_ANIM_TIME 0.2f
|
||
|
|
||
|
static INDEX idGrunt_Wound = -1;
|
||
|
static INDEX idGrunt_Run = -1;
|
||
|
static INDEX idGrunt_IdlePatrol = -1;
|
||
|
static INDEX idGrunt_IdleAttack = -1;
|
||
|
static INDEX idGrunt_Fire = -1;
|
||
|
static INDEX idGrunt_Default = -1;
|
||
|
static INDEX idGrunt_DeathForward = -1;
|
||
|
static INDEX idGrunt_DeathBackward = -1;
|
||
|
static INDEX idGrunt_GunModel = -1;
|
||
|
|
||
|
static INDEX idGrund_NormalBox = -1;
|
||
|
static INDEX idGrund_DeathBox = -1;
|
||
|
|
||
|
static CTextureObject _toStar01;
|
||
|
|
||
|
#define SHP_BASE_TEXTURE 0
|
||
|
|
||
|
|
||
|
void CGruntSka::SetDefaultProperties(void) {
|
||
|
m_gtType = GT_SOLDIER ;
|
||
|
m_soFire1.SetOwner(this);
|
||
|
m_soFire1.Stop_internal();
|
||
|
m_soFire2.SetOwner(this);
|
||
|
m_soFire2.Stop_internal();
|
||
|
m_fMidBoneRot = 0.0f;
|
||
|
m_miTest.Clear();
|
||
|
|
||
|
CEnemyBase::SetDefaultProperties();
|
||
|
}
|
||
|
CGruntSka::CGruntSka(void)
|
||
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
{
|
||
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_Wound = ska_GetIDFromStringTable ("Grunt_Wound");
|
||
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_Run = ska_GetIDFromStringTable ("Grunt_Run");
|
||
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_IdlePatrol = ska_GetIDFromStringTable ("Grunt_IdlePatrol");
|
||
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_IdleAttack = ska_GetIDFromStringTable ("Grunt_IdleAttack");
|
||
|
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_Fire = ska_GetIDFromStringTable ("Grunt_Fire");
|
||
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_Default = ska_GetIDFromStringTable ("Grunt_Default");
|
||
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_DeathForward = ska_GetIDFromStringTable ("Grunt_DeathForward");
|
||
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_DeathBackward = ska_GetIDFromStringTable ("Grunt_DeathBackward");
|
||
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrunt_GunModel = ska_GetIDFromStringTable ("Flamer");
|
||
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrund_NormalBox = ska_GetIDFromStringTable ("Normal");
|
||
|
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idGrund_DeathBox = ska_GetIDFromStringTable ("Death");
|
||
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::CreateTestModelInstance()
|
||
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
{
|
||
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
try {
|
||
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_miTest . AddMesh_t ((CTString) "ModelsSKA\\Test\\Arm\\Arm.bm");
|
||
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_miTest . AddSkeleton_t ((CTString) "ModelsSKA\\Test\\Arm\\Arm.bs");
|
||
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_miTest . AddAnimSet_t ((CTString) "ModelsSKA\\Test\\Arm\\Arm.ba");
|
||
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_miTest . AddTexture_t ((CTString) "ModelsSKA\\Test\\Arm\\Objects\\Arm.tex" , "Arm" , NULL );
|
||
|
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_miTest . AddColisionBox ("Default" , FLOAT3D (- 0.5f , 0.0f , - 0.5f) , FLOAT3D (0.5f , 2.0f , 0.5f));
|
||
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}catch (char * strErr ){
|
||
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
FatalError (strErr );
|
||
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::BuildGruntModel()
|
||
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
{
|
||
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
en_pmiModelInstance = CreateModelInstance ("GruntSka");
|
||
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CModelInstance * pmi = GetModelInstance ();
|
||
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
try {
|
||
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmi -> AddMesh_t ((CTString) "ModelsSKA\\Enemies\\Grunt\\Grunt.bm");
|
||
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmi -> AddSkeleton_t ((CTString) "ModelsSKA\\Enemies\\Grunt\\Grunt.bs");
|
||
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmi -> AddAnimSet_t ((CTString) "ModelsSKA\\Enemies\\Grunt\\Grunt.ba");
|
||
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmi -> AddTexture_t ((CTString) "ModelsSKA\\Enemies\\Grunt\\Soldier.tex" , "Grunt" , NULL );
|
||
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmi -> AddColisionBox ("Default" , FLOAT3D (- 0.5f , 0.0f , - 0.5f) , FLOAT3D (0.5f , 2.0f , 0.5f));
|
||
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CModelInstance * pmiFlamer = CreateModelInstance ("Flamer");
|
||
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> AddMesh_t ((CTString) "ModelsSKA\\Weapons\\Flamer\\Flamer.bm");
|
||
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> AddSkeleton_t ((CTString) "ModelsSKA\\Weapons\\Flamer\\Flamer.bs");
|
||
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> AddAnimSet_t ((CTString) "ModelsSKA\\Weapons\\Flamer\\Flamer.ba");
|
||
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> AddTexture_t ((CTString) "ModelsSKA\\Weapons\\Flamer\\Flamer.tex" , "Flamer" , NULL );
|
||
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> AddTexture_t ((CTString) "ModelsSKA\\Enemies\\Grunt\\Lava04FX.tex" , "Lava04FX" , NULL );
|
||
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> SetOffsetRot (ANGLE3D (0 , 0 , 180));
|
||
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmi -> AddChild (pmiFlamer );
|
||
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
INDEX iParenBoneID = ska_GetIDFromStringTable ("R_Hand");
|
||
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> SetParentBone (iParenBoneID );
|
||
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetSkaColisionInfo ();
|
||
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}catch (char * strErr ){
|
||
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
FatalError (strErr );
|
||
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::BuildCommanderModel(CEntity * penGrunt)
|
||
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
{
|
||
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetSkaModel ("ModelsSKA\\Enemies\\Grunt\\CommanderNoGun.smc");
|
||
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CModelInstance * pmiFlamer = NULL ;
|
||
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
try {
|
||
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer = ParseSmcFile_t ("ModelsSKA\\Weapons\\Flamer\\Flamer.smc");
|
||
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}catch (char * strErr ){
|
||
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
FatalError (strErr );
|
||
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
INDEX iParenBoneID = ska_GetIDFromStringTable ("R_Hand");
|
||
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CModelInstance * pmi = GetModelInstance ();
|
||
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmi -> AddChild (pmiFlamer );
|
||
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> SetParentBone (iParenBoneID );
|
||
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
pmiFlamer -> SetOffsetRot (ANGLE3D (0 , 0 , 180));
|
||
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetSkaColisionInfo ();
|
||
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
CTString CGruntSka::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath)
|
||
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
{
|
||
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CTString str ;
|
||
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
str . PrintF (TRANS ("A Grunt sent %s into the halls of Valhalla") , strPlayerName );
|
||
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return str ;
|
||
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void * CGruntSka::GetEntityInfo(void) {
|
||
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
if(m_gtType == GT_SOLDIER ){
|
||
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return & eiGruntSoldier ;
|
||
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}else if(m_gtType == GT_COMMANDER ){
|
||
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return & eiGruntSoldier ;
|
||
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}else {
|
||
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ASSERT ("Unknown grunt type!");
|
||
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return NULL ;
|
||
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
const CTFileName & CGruntSka::GetComputerMessageName(void)const {
|
||
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
static DECLARE_CTFILENAME (fnmSoldier , "DataMP\\Messages\\Enemies\\GruntSoldier.txt");
|
||
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
static DECLARE_CTFILENAME (fnmCommander , "DataMP\\Messages\\Enemies\\GruntCommander.txt");
|
||
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
switch(m_gtType ){
|
||
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
default : ASSERT (FALSE );
|
||
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
case GT_SOLDIER : return fnmSoldier ;
|
||
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
case GT_COMMANDER : return fnmCommander ;
|
||
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::Precache(void) {
|
||
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CEnemyBase :: Precache ();
|
||
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
if(m_gtType == GT_SOLDIER ){
|
||
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PrecacheClass (CLASS_PROJECTILE , PRT_GRUNT_PROJECTILE_SOL );
|
||
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
if(m_gtType == GT_COMMANDER ){
|
||
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PrecacheClass (CLASS_PROJECTILE , PRT_GRUNT_PROJECTILE_COM );
|
||
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PrecacheSound (SOUND_IDLE );
|
||
|
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PrecacheSound (SOUND_SIGHT );
|
||
|
#line 297 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PrecacheSound (SOUND_WOUND );
|
||
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PrecacheSound (SOUND_FIRE );
|
||
|
#line 299 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PrecacheSound (SOUND_DEATH );
|
||
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
||
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
||
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
{
|
||
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
||
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
INDEX CGruntSka::AnimForDamage(FLOAT fDamage) {
|
||
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Wound , AN_CLEAR , 1 , 0);
|
||
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return idGrunt_Wound ;
|
||
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
INDEX CGruntSka::AnimForDeath(void) {
|
||
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
INDEX idAnimDeath ;
|
||
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
FLOAT3D vFront ;
|
||
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetHeadingDirection (0 , vFront );
|
||
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
FLOAT fDamageDir = m_vDamage % vFront ;
|
||
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
if(fDamageDir < 0){
|
||
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idAnimDeath = idGrunt_DeathBackward ;
|
||
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}else {
|
||
|
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
idAnimDeath = idGrunt_DeathForward ;
|
||
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idAnimDeath , AN_CLEAR , 1 , 0);
|
||
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return idAnimDeath ;
|
||
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
FLOAT CGruntSka::WaitForDust(FLOAT3D & vStretch) {
|
||
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
vStretch = FLOAT3D (1 , 1 , 2);
|
||
|
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
if(GetModelInstance () -> IsAnimationPlaying (idGrunt_DeathBackward )){
|
||
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return 0.5f;
|
||
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}else if(GetModelInstance () -> IsAnimationPlaying (idGrunt_DeathForward )){
|
||
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return 1.0f;
|
||
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return - 1.0f;
|
||
|
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 343 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::DeathNotify(void) {
|
||
|
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
INDEX iBoxIndex = GetModelInstance () -> GetColisionBoxIndex (idGrund_DeathBox );
|
||
|
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ASSERT (iBoxIndex >= 0);
|
||
|
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ChangeCollisionBoxIndexWhenPossible (iBoxIndex );
|
||
|
#line 347 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
en_fDensity = 500.0f;
|
||
|
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 351 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::StandingAnim(void) {
|
||
|
#line 352 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_IdleAttack , AN_LOOPING | AN_NORESTART | AN_CLEAR , 1 , 0);
|
||
|
#line 353 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::RunningAnim(void) {
|
||
|
#line 359 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Run , AN_LOOPING | AN_NORESTART | AN_CLEAR , 1 , 0);
|
||
|
#line 360 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 361 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::WalkingAnim(void) {
|
||
|
#line 362 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
RunningAnim ();
|
||
|
#line 363 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 364 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::RotatingAnim(void) {
|
||
|
#line 365 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
RunningAnim ();
|
||
|
#line 366 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 369 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::IdleSound(void) {
|
||
|
#line 370 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soSound , SOUND_IDLE , SOF_3D );
|
||
|
#line 371 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 372 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::SightSound(void) {
|
||
|
#line 373 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soSound , SOUND_SIGHT , SOF_3D );
|
||
|
#line 374 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::WoundSound(void) {
|
||
|
#line 376 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soSound , SOUND_WOUND , SOF_3D );
|
||
|
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 378 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::DeathSound(void) {
|
||
|
#line 379 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soSound , SOUND_DEATH , SOF_3D );
|
||
|
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
|
||
|
#line 383 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
void CGruntSka::EnemyPostInit(void)
|
||
|
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
{
|
||
|
#line 386 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_soFire1 . Set3DParameters (160.0f , 50.0f , 1.0f , 1.0f);
|
||
|
#line 387 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_soFire2 . Set3DParameters (160.0f , 50.0f , 1.0f , 1.0f);
|
||
|
#line 388 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
BOOL CGruntSka::
|
||
|
#line 394 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
Fire(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CGruntSka_Fire
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGruntSka::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
if(!(m_gtType == GT_SOLDIER )){ Jump(STATE_CURRENT,0x01570008, FALSE, EInternal());return TRUE;}
|
||
|
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
STATE_CGruntSka_SoldierAttack, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01570001, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x01570001_Fire_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570001
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CGruntSka_SoldierAttack, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x01570002, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x01570002_Fire_02(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570002
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01570007, FALSE, EInternal());return TRUE;}BOOL CGruntSka::H0x01570008_Fire_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570008
|
||
|
if(!(m_gtType == GT_COMMANDER )){ Jump(STATE_CURRENT,0x01570006, FALSE, EInternal());return TRUE;}
|
||
|
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
STATE_CGruntSka_CommanderAttack, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01570003, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x01570003_Fire_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570003
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CGruntSka_CommanderAttack, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x01570004, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x01570004_Fire_04(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570004
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;Jump(STATE_CURRENT,0x01570005, FALSE, EInternal());return TRUE;}BOOL CGruntSka::H0x01570006_Fire_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570006
|
||
|
{
|
||
|
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ASSERT (FALSE );
|
||
|
#line 404 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}Jump(STATE_CURRENT,0x01570005, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CGruntSka::H0x01570005_Fire_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570005
|
||
|
Jump(STATE_CURRENT,0x01570007, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CGruntSka::H0x01570007_Fire_07(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570007
|
||
|
|
||
|
#line 405 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
Return(STATE_CURRENT,EReturn ());
|
||
|
#line 405 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CGruntSka::
|
||
|
#line 409 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SoldierAttack(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CGruntSka_SoldierAttack
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGruntSka::SoldierAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 411 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
StandingAnimFight ();
|
||
|
#line 412 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(0.2f + FRnd () * 0.25f);
|
||
|
Jump(STATE_CURRENT, 0x0157000a, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x0157000a_SoldierAttack_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157000a
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0157000b, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x0157000b_SoldierAttack_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157000b
|
||
|
;
|
||
|
#line 414 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Fire , AN_CLEAR , 1.0f , 0);
|
||
|
#line 416 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ShootProjectile (PRT_GRUNT_PROJECTILE_SOL , FIREPOS_SOLDIER , ANGLE3D (0 , 0 , 0));
|
||
|
#line 417 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soFire1 , SOUND_FIRE , SOF_3D );
|
||
|
#line 419 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(0.15f + FRnd () * 0.1f);
|
||
|
Jump(STATE_CURRENT, 0x0157000c, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x0157000c_SoldierAttack_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157000c
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0157000d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x0157000d_SoldierAttack_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157000d
|
||
|
;
|
||
|
#line 420 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Fire , AN_CLEAR , 1.0f , 0);
|
||
|
#line 421 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ShootProjectile (PRT_GRUNT_PROJECTILE_SOL , FIREPOS_SOLDIER , ANGLE3D (0 , 0 , 0));
|
||
|
#line 422 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
||
|
#line 425 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(FRnd () * 0.333f);
|
||
|
Jump(STATE_CURRENT, 0x0157000e, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x0157000e_SoldierAttack_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157000e
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0157000f, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x0157000f_SoldierAttack_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157000f
|
||
|
;
|
||
|
#line 426 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 426 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CGruntSka::
|
||
|
#line 430 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
CommanderAttack(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CGruntSka_CommanderAttack
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGruntSka::CommanderAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 431 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
StandingAnimFight ();
|
||
|
#line 432 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(0.2f + FRnd () * 0.25f);
|
||
|
Jump(STATE_CURRENT, 0x01570011, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x01570011_CommanderAttack_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570011
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01570012, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x01570012_CommanderAttack_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570012
|
||
|
;
|
||
|
#line 442 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Fire , AN_CLEAR , 1 , 0);
|
||
|
#line 443 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (- 20 , 0 , 0));
|
||
|
#line 444 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soFire1 , SOUND_FIRE , SOF_3D );
|
||
|
#line 446 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(0.035f);
|
||
|
Jump(STATE_CURRENT, 0x01570013, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x01570013_CommanderAttack_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570013
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01570014, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x01570014_CommanderAttack_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570014
|
||
|
;
|
||
|
#line 447 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Fire , AN_CLEAR , 1 , 0);
|
||
|
#line 448 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (- 10 , 0 , 0));
|
||
|
#line 449 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
||
|
#line 451 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(0.035f);
|
||
|
Jump(STATE_CURRENT, 0x01570015, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x01570015_CommanderAttack_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570015
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01570016, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x01570016_CommanderAttack_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570016
|
||
|
;
|
||
|
#line 452 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Fire , AN_CLEAR , 1 , 0);
|
||
|
#line 453 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (0 , 0 , 0));
|
||
|
#line 454 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soFire1 , SOUND_FIRE , SOF_3D );
|
||
|
#line 456 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(0.035f);
|
||
|
Jump(STATE_CURRENT, 0x01570017, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x01570017_CommanderAttack_07(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570017
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01570018, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x01570018_CommanderAttack_08(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570018
|
||
|
;
|
||
|
#line 457 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Fire , AN_CLEAR , 1 , 0);
|
||
|
#line 458 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (10 , 0 , 0));
|
||
|
#line 459 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
||
|
#line 461 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(0.035f);
|
||
|
Jump(STATE_CURRENT, 0x01570019, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x01570019_CommanderAttack_09(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01570019
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0157001a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x0157001a_CommanderAttack_10(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157001a
|
||
|
;
|
||
|
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> AddAnimation (idGrunt_Fire , AN_CLEAR , 1 , 0);
|
||
|
#line 463 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (20 , 0 , 0));
|
||
|
#line 464 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
||
|
#line 466 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetTimerAfter(FRnd () * 0.5f);
|
||
|
Jump(STATE_CURRENT, 0x0157001b, FALSE, EBegin());return TRUE;}BOOL CGruntSka::H0x0157001b_CommanderAttack_11(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157001b
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0157001c, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CGruntSka::H0x0157001c_CommanderAttack_12(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0157001c
|
||
|
;
|
||
|
#line 467 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 467 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CGruntSka::
|
||
|
#line 473 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CGruntSka_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGruntSka::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 475 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
InitAsSkaModel ();
|
||
|
#line 476 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_WALKING | EPF_HASLUNGS );
|
||
|
#line 477 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetCollisionFlags (ECF_MODEL );
|
||
|
#line 478 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetFlags (GetFlags () | ENF_ALIVE );
|
||
|
#line 479 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
en_tmMaxHoldBreath = 5.0f;
|
||
|
#line 480 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
en_fDensity = 2000.0f;
|
||
|
#line 487 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
switch(m_gtType ){
|
||
|
#line 488 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
case GT_SOLDIER :
|
||
|
#line 489 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetSkaModel (SOLIDER_SMC_MODEL );
|
||
|
#line 493 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fWalkSpeed = FRnd () + 2.5f;
|
||
|
#line 494 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_aWalkRotateSpeed = AngleDeg (FRnd () * 10.0f + 500.0f);
|
||
|
#line 495 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fAttackRunSpeed = FRnd () + 6.5f;
|
||
|
#line 496 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_aAttackRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
||
|
#line 497 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fCloseRunSpeed = FRnd () + 6.5f;
|
||
|
#line 498 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_aCloseRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
||
|
#line 500 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fAttackDistance = 80.0f;
|
||
|
#line 501 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fCloseDistance = 0.0f;
|
||
|
#line 502 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fStopDistance = 8.0f;
|
||
|
#line 503 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fAttackFireTime = 2.0f;
|
||
|
#line 504 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fCloseFireTime = 1.0f;
|
||
|
#line 505 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fIgnoreRange = 200.0f;
|
||
|
#line 507 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fBlowUpAmount = 80.0f;
|
||
|
#line 508 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fBodyParts = 4;
|
||
|
#line 509 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fDamageWounded = 0.0f;
|
||
|
#line 510 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_iScore = 500;
|
||
|
#line 511 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetHealth (40.0f);
|
||
|
#line 512 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fMaxHealth = 40.0f;
|
||
|
#line 514 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> StretchModel (FLOAT3D (STRETCH_SOLDIER , STRETCH_SOLDIER , STRETCH_SOLDIER ));
|
||
|
#line 515 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
break ;
|
||
|
#line 517 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
case GT_COMMANDER :
|
||
|
#line 519 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetSkaModel (COMANDER_SMC_MODEL );
|
||
|
#line 522 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fWalkSpeed = FRnd () + 2.5f;
|
||
|
#line 523 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_aWalkRotateSpeed = AngleDeg (FRnd () * 10.0f + 500.0f);
|
||
|
#line 524 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fAttackRunSpeed = FRnd () + 8.0f;
|
||
|
#line 525 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_aAttackRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
||
|
#line 526 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fCloseRunSpeed = FRnd () + 8.0f;
|
||
|
#line 527 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_aCloseRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
||
|
#line 529 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fAttackDistance = 90.0f;
|
||
|
#line 530 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fCloseDistance = 0.0f;
|
||
|
#line 531 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fStopDistance = 15.0f;
|
||
|
#line 532 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fAttackFireTime = 4.0f;
|
||
|
#line 533 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fCloseFireTime = 2.0f;
|
||
|
#line 535 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fIgnoreRange = 200.0f;
|
||
|
#line 537 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fBodyParts = 5;
|
||
|
#line 538 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fDamageWounded = 0.0f;
|
||
|
#line 539 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_iScore = 800;
|
||
|
#line 540 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
SetHealth (60.0f);
|
||
|
#line 541 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
m_fMaxHealth = 60.0f;
|
||
|
#line 543 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
GetModelInstance () -> StretchModel (FLOAT3D (STRETCH_COMMANDER , STRETCH_COMMANDER , STRETCH_COMMANDER ));
|
||
|
#line 544 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
break ;
|
||
|
#line 545 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
}
|
||
|
#line 547 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
ModelChangeNotify ();
|
||
|
#line 548 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
StandingAnim ();
|
||
|
#line 551 "D:/SE1_GPL/Sources/EntitiesMP/GruntSka.es"
|
||
|
Jump(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};
|