mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
598 lines
27 KiB
C++
598 lines
27 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
|
|
#include "StdH.h"
|
|
#include "ModelsMP/Enemies/Grunt/Grunt.h"
|
|
|
|
#include <EntitiesMP/Grunt.h>
|
|
#include <EntitiesMP/Grunt_tables.h>
|
|
#line 17 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.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
|
|
|
|
void CGrunt::SetDefaultProperties(void) {
|
|
m_gtType = GT_SOLDIER ;
|
|
m_soFire1.SetOwner(this);
|
|
m_soFire1.Stop_internal();
|
|
m_soFire2.SetOwner(this);
|
|
m_soFire2.Stop_internal();
|
|
CEnemyBase::SetDefaultProperties();
|
|
}
|
|
CTString CGrunt::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath)
|
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
{
|
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
CTString str ;
|
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
str . PrintF (TRANS ("A Grunt sent %s into the halls of Valhalla") , strPlayerName );
|
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return str ;
|
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void * CGrunt::GetEntityInfo(void) {
|
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
if(m_gtType == GT_SOLDIER ){
|
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return & eiGruntSoldier ;
|
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}else if(m_gtType == GT_COMMANDER ){
|
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return & eiGruntSoldier ;
|
|
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}else {
|
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ASSERT ("Unknown grunt type!");
|
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return NULL ;
|
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
const CTFileName & CGrunt::GetComputerMessageName(void)const {
|
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
static DECLARE_CTFILENAME (fnmSoldier , "DataMP\\Messages\\Enemies\\GruntSoldier.txt");
|
|
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
static DECLARE_CTFILENAME (fnmCommander , "DataMP\\Messages\\Enemies\\GruntCommander.txt");
|
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
switch(m_gtType ){
|
|
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
default : ASSERT (FALSE );
|
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
case GT_SOLDIER : return fnmSoldier ;
|
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
case GT_COMMANDER : return fnmCommander ;
|
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::Precache(void) {
|
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
CEnemyBase :: Precache ();
|
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
if(m_gtType == GT_SOLDIER ){
|
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PrecacheClass (CLASS_PROJECTILE , PRT_GRUNT_PROJECTILE_SOL );
|
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
if(m_gtType == GT_COMMANDER ){
|
|
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PrecacheClass (CLASS_PROJECTILE , PRT_GRUNT_PROJECTILE_COM );
|
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PrecacheSound (SOUND_IDLE );
|
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PrecacheSound (SOUND_SIGHT );
|
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PrecacheSound (SOUND_WOUND );
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PrecacheSound (SOUND_FIRE );
|
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PrecacheSound (SOUND_DEATH );
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
{
|
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
INDEX CGrunt::AnimForDamage(FLOAT fDamage) {
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
INDEX iAnim ;
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
iAnim = GRUNT_ANIM_WOUND01 ;
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (iAnim , 0);
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return iAnim ;
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
INDEX CGrunt::AnimForDeath(void) {
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
INDEX iAnim ;
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
FLOAT3D vFront ;
|
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
GetHeadingDirection (0 , vFront );
|
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
FLOAT fDamageDir = m_vDamage % vFront ;
|
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
if(fDamageDir < 0){
|
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
iAnim = GRUNT_ANIM_DEATHBACKWARD ;
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}else {
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
iAnim = GRUNT_ANIM_DEATHFORWARD ;
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (iAnim , 0);
|
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return iAnim ;
|
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
FLOAT CGrunt::WaitForDust(FLOAT3D & vStretch) {
|
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
vStretch = FLOAT3D (1 , 1 , 2);
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
if(GetModelObject () -> GetAnim () == GRUNT_ANIM_DEATHBACKWARD )
|
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
{
|
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return 0.5f;
|
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
else if(GetModelObject () -> GetAnim () == GRUNT_ANIM_DEATHFORWARD )
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
{
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return 1.0f;
|
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return - 1.0f;
|
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::DeathNotify(void) {
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ChangeCollisionBoxIndexWhenPossible (GRUNT_COLLISION_BOX_DEATH );
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
en_fDensity = 500.0f;
|
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::StandingAnim(void) {
|
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART );
|
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::RunningAnim(void) {
|
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_RUN , AOF_LOOPING | AOF_NORESTART );
|
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::WalkingAnim(void) {
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
RunningAnim ();
|
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::RotatingAnim(void) {
|
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
RunningAnim ();
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::IdleSound(void) {
|
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soSound , SOUND_IDLE , SOF_3D );
|
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::SightSound(void) {
|
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soSound , SOUND_SIGHT , SOF_3D );
|
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::WoundSound(void) {
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soSound , SOUND_WOUND , SOF_3D );
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::DeathSound(void) {
|
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soSound , SOUND_DEATH , SOF_3D );
|
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
|
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
void CGrunt::EnemyPostInit(void)
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
{
|
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_soFire1 . Set3DParameters (160.0f , 50.0f , 1.0f , 1.0f);
|
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_soFire2 . Set3DParameters (160.0f , 50.0f , 1.0f , 1.0f);
|
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
BOOL CGrunt::
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
Fire(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGrunt_Fire
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGrunt::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
if(!(m_gtType == GT_SOLDIER )){ Jump(STATE_CURRENT,0x01570008, FALSE, EInternal());return TRUE;}
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
STATE_CGrunt_SoldierAttack, TRUE;
|
|
Jump(STATE_CURRENT, 0x01570001, FALSE, EBegin());return TRUE;}BOOL CGrunt::H0x01570001_Fire_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570001
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CGrunt_SoldierAttack, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x01570002, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CGrunt::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 CGrunt::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 220 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
STATE_CGrunt_CommanderAttack, TRUE;
|
|
Jump(STATE_CURRENT, 0x01570003, FALSE, EBegin());return TRUE;}BOOL CGrunt::H0x01570003_Fire_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570003
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CGrunt_CommanderAttack, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x01570004, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CGrunt::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 CGrunt::H0x01570006_Fire_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570006
|
|
{
|
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ASSERT (FALSE );
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}Jump(STATE_CURRENT,0x01570005, FALSE, EInternal());return TRUE;}
|
|
BOOL CGrunt::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 CGrunt::H0x01570007_Fire_07(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570007
|
|
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CGrunt::
|
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SoldierAttack(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGrunt_SoldierAttack
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGrunt::SoldierAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StandingAnimFight ();
|
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(0.2f + FRnd () * 0.25f);
|
|
Jump(STATE_CURRENT, 0x0157000a, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x0157000b_SoldierAttack_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0157000b
|
|
;
|
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_FIRE , 0);
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ShootProjectile (PRT_GRUNT_PROJECTILE_SOL , FIREPOS_SOLDIER , ANGLE3D (0 , 0 , 0));
|
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soFire1 , SOUND_FIRE , SOF_3D );
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(0.15f + FRnd () * 0.1f);
|
|
Jump(STATE_CURRENT, 0x0157000c, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x0157000d_SoldierAttack_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0157000d
|
|
;
|
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_FIRE , 0);
|
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ShootProjectile (PRT_GRUNT_PROJECTILE_SOL , FIREPOS_SOLDIER , ANGLE3D (0 , 0 , 0));
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(FRnd () * 0.333f);
|
|
Jump(STATE_CURRENT, 0x0157000e, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x0157000f_SoldierAttack_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0157000f
|
|
;
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
Return(STATE_CURRENT,EEnd ());
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CGrunt::
|
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
CommanderAttack(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGrunt_CommanderAttack
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGrunt::CommanderAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StandingAnimFight ();
|
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(0.2f + FRnd () * 0.25f);
|
|
Jump(STATE_CURRENT, 0x01570011, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x01570012_CommanderAttack_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570012
|
|
;
|
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_FIRE , 0);
|
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (- 20 , 0 , 0));
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soFire1 , SOUND_FIRE , SOF_3D );
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(0.035f);
|
|
Jump(STATE_CURRENT, 0x01570013, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x01570014_CommanderAttack_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570014
|
|
;
|
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_FIRE , 0);
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (- 10 , 0 , 0));
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(0.035f);
|
|
Jump(STATE_CURRENT, 0x01570015, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x01570016_CommanderAttack_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570016
|
|
;
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_FIRE , 0);
|
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (0 , 0 , 0));
|
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soFire1 , SOUND_FIRE , SOF_3D );
|
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(0.035f);
|
|
Jump(STATE_CURRENT, 0x01570017, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x01570018_CommanderAttack_08(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x01570018
|
|
;
|
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_FIRE , 0);
|
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (10 , 0 , 0));
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(0.035f);
|
|
Jump(STATE_CURRENT, 0x01570019, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x0157001a_CommanderAttack_10(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0157001a
|
|
;
|
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StartModelAnim (GRUNT_ANIM_FIRE , 0);
|
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ShootProjectile (PRT_GRUNT_PROJECTILE_COM , FIREPOS_COMMANDER_DN , ANGLE3D (20 , 0 , 0));
|
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
PlaySound (m_soFire2 , SOUND_FIRE , SOF_3D );
|
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetTimerAfter(FRnd () * 0.5f);
|
|
Jump(STATE_CURRENT, 0x0157001b, FALSE, EBegin());return TRUE;}BOOL CGrunt::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 CGrunt::H0x0157001c_CommanderAttack_12(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0157001c
|
|
;
|
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
Return(STATE_CURRENT,EEnd ());
|
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CGrunt::
|
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGrunt_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGrunt::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
InitAsModel ();
|
|
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetPhysicsFlags (EPF_MODEL_WALKING | EPF_HASLUNGS );
|
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetCollisionFlags (ECF_MODEL );
|
|
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetFlags (GetFlags () | ENF_ALIVE );
|
|
#line 297 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
en_tmMaxHoldBreath = 5.0f;
|
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
en_fDensity = 2000.0f;
|
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetModel (MODEL_GRUNT );
|
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
switch(m_gtType ){
|
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
case GT_SOLDIER :
|
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetModelMainTexture (TEXTURE_SOLDIER );
|
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
AddAttachment (GRUNT_ATTACHMENT_GUN_SMALL , MODEL_GUN_SOLDIER , TEXTURE_GUN_SOLDIER );
|
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fWalkSpeed = FRnd () + 2.5f;
|
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_aWalkRotateSpeed = AngleDeg (FRnd () * 10.0f + 500.0f);
|
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fAttackRunSpeed = FRnd () + 6.5f;
|
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_aAttackRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fCloseRunSpeed = FRnd () + 6.5f;
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_aCloseRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fAttackDistance = 80.0f;
|
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fCloseDistance = 0.0f;
|
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fStopDistance = 8.0f;
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fAttackFireTime = 2.0f;
|
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fCloseFireTime = 1.0f;
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fIgnoreRange = 200.0f;
|
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fBlowUpAmount = 80.0f;
|
|
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fBodyParts = 4;
|
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fDamageWounded = 0.0f;
|
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_iScore = 500;
|
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetHealth (40.0f);
|
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fMaxHealth = 40.0f;
|
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
GetModelObject () -> StretchModel (FLOAT3D (STRETCH_SOLDIER , STRETCH_SOLDIER , STRETCH_SOLDIER ));
|
|
#line 331 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
break ;
|
|
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
case GT_COMMANDER :
|
|
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetModelMainTexture (TEXTURE_COMMANDER );
|
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
AddAttachment (GRUNT_ATTACHMENT_GUN_COMMANDER , MODEL_GUN_COMMANDER , TEXTURE_GUN_COMMANDER );
|
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fWalkSpeed = FRnd () + 2.5f;
|
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_aWalkRotateSpeed = AngleDeg (FRnd () * 10.0f + 500.0f);
|
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fAttackRunSpeed = FRnd () + 8.0f;
|
|
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_aAttackRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
|
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fCloseRunSpeed = FRnd () + 8.0f;
|
|
#line 343 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_aCloseRotateSpeed = AngleDeg (FRnd () * 50 + 245.0f);
|
|
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fAttackDistance = 90.0f;
|
|
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fCloseDistance = 0.0f;
|
|
#line 347 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fStopDistance = 15.0f;
|
|
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fAttackFireTime = 4.0f;
|
|
#line 349 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fCloseFireTime = 2.0f;
|
|
#line 351 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fIgnoreRange = 200.0f;
|
|
#line 353 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fBodyParts = 5;
|
|
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fDamageWounded = 0.0f;
|
|
#line 355 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_iScore = 800;
|
|
#line 356 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
SetHealth (60.0f);
|
|
#line 357 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
m_fMaxHealth = 60.0f;
|
|
#line 359 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
GetModelObject () -> StretchModel (FLOAT3D (STRETCH_COMMANDER , STRETCH_COMMANDER , STRETCH_COMMANDER ));
|
|
#line 360 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
break ;
|
|
#line 361 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
}
|
|
#line 363 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
ModelChangeNotify ();
|
|
#line 364 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
StandingAnim ();
|
|
#line 367 "D:/SE1_GPL/Sources/EntitiesMP/Grunt.es"
|
|
Jump(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;}; |