Serious-Engine/Sources/EntitiesMP/EnemyFly.cpp

564 lines
28 KiB
C++
Raw Normal View History

2016-03-11 14:57:17 +01:00
/*
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
*/
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
#include "StdH.h"
#include <EntitiesMP/EnemyFly.h>
#include <EntitiesMP/EnemyFly_tables.h>
void CEnemyFly::SetDefaultProperties(void) {
m_EeftType = EFT_FLY_GROUND_AIR ;
m_bInAir = FALSE ;
m_bAirAttack = FALSE ;
m_bStartInAir = FALSE ;
m_fGroundToAirSpeed = 2.0f;
m_fAirToGroundSpeed = 4.0f;
m_fAirToGroundMin = 1.0f;
m_fAirToGroundMax = 2.0f;
m_fFlyHeight = 2.0f;
m_fFlyWalkSpeed = 1.0f;
m_aFlyWalkRotateSpeed = AngleDeg(10.0f);
m_fFlyAttackRunSpeed = 1.0f;
m_aFlyAttackRotateSpeed = AngleDeg(10.0f);
m_fFlyCloseRunSpeed = 1.0f;
m_aFlyCloseRotateSpeed = AngleDeg(10.0f);
m_fFlyAttackDistance = 50.0f;
m_fFlyCloseDistance = 10.0f;
m_fFlyAttackFireTime = 2.0f;
m_fFlyCloseFireTime = 1.0f;
m_fFlyStopDistance = 0.0f;
m_fFlyIgnoreRange = 200.0f;
m_fFlyLockOnEnemyTime = 0.0f;
m_bFlyToMarker = FALSE ;
CEnemyBase::SetDefaultProperties();
}
FLOAT & CEnemyFly::GetProp(FLOAT & m_fBase)
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
{
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(m_bInAir ){
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return * ((& m_fBase ) + (& m_fFlyWalkSpeed - & m_fWalkSpeed ));
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}else {
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return m_fBase ;
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
FLOAT3D CEnemyFly::PlayerDestinationPos(void)
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
{
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(! m_bInAir ){
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return CEnemyBase :: PlayerDestinationPos ();
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
FLOAT fDist = CalcDist (m_penEnemy );
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
FLOAT fHeight ;
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(fDist <= m_fFlyCloseDistance ){
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
fHeight = m_fFlyHeight ;
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}else {
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
fHeight = m_fFlyHeight + fDist / 5.0f;
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_penEnemy -> GetPlacement () . pl_PositionVector
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
+ FLOAT3D (m_penEnemy -> en_mRotation (1 , 2) , m_penEnemy -> en_mRotation (2 , 2) , m_penEnemy -> en_mRotation (3 , 2))
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
* fHeight ;
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
void CEnemyFly::StartPathFinding(void)
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
{
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(m_bInAir ){
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_dtDestination = DT_PLAYERSPOTTED ;
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_vPlayerSpotted = PlayerDestinationPos ();
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}else {
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
CEnemyBase :: StartPathFinding ();
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
void CEnemyFly::AdjustDifficulty(void)
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
{
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
FLOAT fMoveSpeed = GetSP () -> sp_fEnemyMovementSpeed ;
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
FLOAT fAttackSpeed = GetSP () -> sp_fEnemyMovementSpeed ;
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_fFlyAttackFireTime *= 1 / fAttackSpeed ;
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_fFlyCloseFireTime *= 1 / fAttackSpeed ;
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_fFlyLockOnEnemyTime *= 1 / fAttackSpeed ;
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_fFlyAttackRunSpeed *= fMoveSpeed ;
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_aFlyAttackRotateSpeed *= fMoveSpeed ;
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_fFlyCloseRunSpeed *= fMoveSpeed ;
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_aFlyCloseRotateSpeed *= fMoveSpeed ;
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_fGroundToAirSpeed *= fMoveSpeed ;
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_fAirToGroundSpeed *= fMoveSpeed ;
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
CEnemyBase :: AdjustDifficulty ();
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
BOOL CEnemyFly::CanHitEnemy(CEntity * penTarget,FLOAT fCosAngle) {
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(IsInPlaneFrustum (penTarget , fCosAngle )){
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return IsVisibleCheckAll (penTarget );
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return FALSE ;
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
ULONG CEnemyFly::SetDesiredMovement(void)
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
{
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(! m_bInAir ){
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return CEnemyBase :: SetDesiredMovement ();
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ULONG ulFlags = CEnemyBase :: SetDesiredMovement ();
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(m_fMoveSpeed > 0.0f){
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
FLOAT3D vTranslation = (m_vDesiredPosition - GetPlacement () . pl_PositionVector ) * ! en_mRotation ;
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
vTranslation (1) = 0.0f;
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(vTranslation (3) > 0){
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
vTranslation (3) = 0.0f;
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
vTranslation . Normalize ();
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
vTranslation *= m_fMoveSpeed ;
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetDesiredTranslation (vTranslation );
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return ulFlags ;
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
void CEnemyFly::SetEntityPosition() {
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
switch(m_EeftType ){
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
case EFT_GROUND_ONLY :
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
case EFT_FLY_GROUND_GROUND :
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bAirAttack = FALSE ;
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bStartInAir = m_bInAir = FALSE ;
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bFlyToMarker = FALSE ;
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetPhysicsFlags ((GetPhysicsFlags () & ~ EPF_MODEL_FLYING ) | EPF_MODEL_WALKING );
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ChangeCollisionToGround ();
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
break ;
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
case EFT_FLY_GROUND_AIR :
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bAirAttack = TRUE ;
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bStartInAir = m_bInAir = FALSE ;
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bFlyToMarker = FALSE ;
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetPhysicsFlags ((GetPhysicsFlags () & ~ EPF_MODEL_FLYING ) | EPF_MODEL_WALKING );
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ChangeCollisionToGround ();
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
break ;
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
case EFT_FLY_AIR_GROUND :
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bAirAttack = FALSE ;
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bStartInAir = m_bInAir = TRUE ;
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bFlyToMarker = TRUE ;
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetPhysicsFlags ((GetPhysicsFlags () & ~ EPF_MODEL_WALKING ) | EPF_MODEL_FLYING );
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ChangeCollisionToAir ();
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
break ;
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
case EFT_FLY_ONLY :
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
case EFT_FLY_AIR_AIR :
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bAirAttack = TRUE ;
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bStartInAir = m_bInAir = TRUE ;
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bFlyToMarker = TRUE ;
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetPhysicsFlags ((GetPhysicsFlags () & ~ EPF_MODEL_WALKING ) | EPF_MODEL_FLYING );
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ChangeCollisionToAir ();
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
break ;
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
StandingAnim ();
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
FLOAT CEnemyFly::AirToGroundAnim(void) {return _pTimer -> TickQuantum ;}
FLOAT CEnemyFly::GroundToAirAnim(void) {return _pTimer -> TickQuantum ;}
void CEnemyFly::ChangeCollisionToAir(void) {}
void CEnemyFly::ChangeCollisionToGround(void) {}
BOOL CEnemyFly::
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ReturnToStartPosition(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_ReturnToStartPosition
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::ReturnToStartPosition expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyBase_BeIdle, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
BeWounded(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_BeWounded
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDamage, "CEnemyFly::BeWounded expects 'EDamage' as input!"); const EDamage &eDamage = (const EDamage &)__eeInput;
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(!(! (m_EeftType != EFT_FLY_ONLY && m_bInAir && ((IRnd () & 3) == 0)))){ Jump(STATE_CURRENT,0x01370006, FALSE, EInternal());return TRUE;}
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyBase_BeWounded, FALSE, eDamage );return TRUE;Jump(STATE_CURRENT,0x01370005, FALSE, EInternal());return TRUE;}BOOL CEnemyFly::H0x01370006_BeWounded_05(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370006
if(!(TRUE )){ Jump(STATE_CURRENT,0x01370004, FALSE, EInternal());return TRUE;}
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bAirAttack = FALSE ;
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
STATE_CEnemyFly_AirToGround, TRUE;
Jump(STATE_CURRENT, 0x01370002, FALSE, EBegin());return TRUE;}BOOL CEnemyFly::H0x01370002_BeWounded_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370002
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyFly_AirToGround, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01370003, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyFly::H0x01370003_BeWounded_02(const CEntityEvent &__eeInput){
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370003
const EReturn&__e= (EReturn&)__eeInput;
;Jump(STATE_CURRENT,0x01370004, FALSE, EInternal());return TRUE;}BOOL CEnemyFly::H0x01370004_BeWounded_03(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370004
Jump(STATE_CURRENT,0x01370005, FALSE, EInternal());return TRUE;}
BOOL CEnemyFly::H0x01370005_BeWounded_04(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370005
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EReturn ());
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
AirToGround(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_AirToGround
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::AirToGround expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetDesiredTranslation (FLOAT3D (0 , - m_fAirToGroundSpeed , 0));
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetDesiredRotation (ANGLE3D (0 , 0 , 0));
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
WalkingAnim ();
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetTimerAt(THINKTIME_NEVER);
Jump(STATE_CURRENT, 0x01370008, FALSE, EBegin());return TRUE;}BOOL CEnemyFly::H0x01370008_AirToGround_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370008
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETouch):{const ETouch&etouch= (ETouch&)__eeInput;
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(etouch . penOther -> GetRenderType () & RT_BRUSH ){
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetDesiredTranslation (FLOAT3D (0 , 0 , 0));
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
UnsetTimer();Jump(STATE_CURRENT,0x01370009, FALSE, EInternal());return TRUE;
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE;
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&e= (EDeath&)__eeInput;
return FALSE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}return TRUE;}BOOL CEnemyFly::H0x01370009_AirToGround_02(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370009
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetPhysicsFlags ((GetPhysicsFlags () & ~ EPF_MODEL_FLYING ) | EPF_MODEL_WALKING );
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bInAir = FALSE ;
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ChangeCollisionToGround ();
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetTimerAfter(AirToGroundAnim ());
Jump(STATE_CURRENT, 0x0137000a, FALSE, EBegin());return TRUE;}BOOL CEnemyFly::H0x0137000a_AirToGround_03(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x0137000a
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
UnsetTimer();Jump(STATE_CURRENT,0x0137000b, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&e= (EDeath&)__eeInput;
return FALSE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
#line 353 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}return TRUE;}BOOL CEnemyFly::H0x0137000b_AirToGround_04(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x0137000b
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EReturn ());
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
GroundToAir(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_GroundToAir
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::GroundToAir expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 361 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetPhysicsFlags ((GetPhysicsFlags () & ~ EPF_MODEL_WALKING ) | EPF_MODEL_FLYING );
#line 362 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
m_bInAir = TRUE ;
#line 363 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetDesiredTranslation (FLOAT3D (0 , m_fGroundToAirSpeed , 0));
#line 364 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetDesiredRotation (ANGLE3D (0 , 0 , 0));
#line 365 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ChangeCollisionToAir ();
#line 367 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetTimerAfter(GroundToAirAnim ());
Jump(STATE_CURRENT, 0x0137000d, FALSE, EBegin());return TRUE;}BOOL CEnemyFly::H0x0137000d_GroundToAir_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x0137000d
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&e= (EDeath&)__eeInput;
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
UnsetTimer();Jump(STATE_CURRENT,0x0137000e, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
#line 372 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}return TRUE;}BOOL CEnemyFly::H0x0137000e_GroundToAir_02(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x0137000e
#line 374 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
WalkingAnim ();
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetTimerAfter(Lerp (m_fAirToGroundMin , m_fAirToGroundMax , FRnd ()));
Jump(STATE_CURRENT, 0x0137000f, FALSE, EBegin());return TRUE;}BOOL CEnemyFly::H0x0137000f_GroundToAir_03(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x0137000f
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&e= (EDeath&)__eeInput;
return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
UnsetTimer();Jump(STATE_CURRENT,0x01370010, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}return TRUE;}BOOL CEnemyFly::H0x01370010_GroundToAir_04(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370010
#line 381 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetDesiredTranslation (FLOAT3D (0 , 0 , 0));
#line 382 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EReturn ());
#line 382 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 391 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
AttackEnemy(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_AttackEnemy
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::AttackEnemy expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 394 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(!(m_bAirAttack )){ Jump(STATE_CURRENT,0x0137001a, FALSE, EInternal());return TRUE;}
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(!(! m_bInAir )){ Jump(STATE_CURRENT,0x01370014, FALSE, EInternal());return TRUE;}
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
STATE_CEnemyFly_GroundToAir, TRUE;
Jump(STATE_CURRENT, 0x01370012, FALSE, EBegin());return TRUE;}BOOL CEnemyFly::H0x01370012_AttackEnemy_01(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370012
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyFly_GroundToAir, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01370013, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyFly::H0x01370013_AttackEnemy_02(const CEntityEvent &__eeInput){
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370013
const EReturn&__e= (EReturn&)__eeInput;
;Jump(STATE_CURRENT,0x01370014, FALSE, EInternal());return TRUE;}BOOL CEnemyFly::H0x01370014_AttackEnemy_03(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370014
Jump(STATE_CURRENT,0x01370019, FALSE, EInternal());return TRUE;}BOOL CEnemyFly::H0x0137001a_AttackEnemy_09(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x0137001a
if(!(TRUE )){ Jump(STATE_CURRENT,0x01370018, FALSE, EInternal());return TRUE;}
#line 402 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(!(m_bInAir )){ Jump(STATE_CURRENT,0x01370017, FALSE, EInternal());return TRUE;}
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
STATE_CEnemyFly_AirToGround, TRUE;
Jump(STATE_CURRENT, 0x01370015, FALSE, EBegin());return TRUE;}BOOL CEnemyFly::H0x01370015_AttackEnemy_04(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370015
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyFly_AirToGround, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01370016, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyFly::H0x01370016_AttackEnemy_05(const CEntityEvent &__eeInput){
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370016
const EReturn&__e= (EReturn&)__eeInput;
;Jump(STATE_CURRENT,0x01370017, FALSE, EInternal());return TRUE;}BOOL CEnemyFly::H0x01370017_AttackEnemy_06(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370017
Jump(STATE_CURRENT,0x01370018, FALSE, EInternal());return TRUE;}BOOL CEnemyFly::H0x01370018_AttackEnemy_07(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370018
Jump(STATE_CURRENT,0x01370019, FALSE, EInternal());return TRUE;}
BOOL CEnemyFly::H0x01370019_AttackEnemy_08(const CEntityEvent &__eeInput){
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
#undef STATE_CURRENT
#define STATE_CURRENT 0x01370019
#line 407 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyBase_AttackEnemy, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 411 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Hit(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_Hit
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::Hit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 413 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(m_bInAir ){
#line 414 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyFly_FlyHit, TRUE, EVoid());return TRUE;
#line 415 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}else {
#line 416 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyFly_GroundHit, TRUE, EVoid());return TRUE;
#line 417 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
} ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 421 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Fire(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_Fire
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 423 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
if(m_bInAir ){
#line 424 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyFly_FlyFire, TRUE, EVoid());return TRUE;
#line 425 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
}else {
#line 426 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyFly_GroundFire, TRUE, EVoid());return TRUE;
#line 427 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
} ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 433 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Death(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_Death
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::Death expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 435 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetPhysicsFlags ((GetPhysicsFlags () & ~ EPF_MODEL_FLYING ) | EPF_MODEL_WALKING );
#line 436 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
ChangeCollisionToGround ();
#line 437 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyBase_Death, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 446 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
MainLoop(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_MainLoop
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::MainLoop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 447 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
SetEntityPosition ();
#line 448 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Jump(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 452 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Main(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_Main
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 453 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EVoid());
#line 453 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 460 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
GroundHit(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_GroundHit
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::GroundHit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EReturn ());
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 465 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
GroundFire(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_GroundFire
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::GroundFire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 467 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EReturn ());
#line 467 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 471 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
FlyHit(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_FlyHit
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::FlyHit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 473 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EReturn ());
#line 473 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyFly::
#line 477 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
FlyFire(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CEnemyFly_FlyFire
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyFly::FlyFire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 479 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
Return(STATE_CURRENT,EReturn ());
#line 479 "D:/SE1_GPL/Sources/EntitiesMP/EnemyFly.es"
return TRUE; ASSERT(FALSE); return TRUE;};