/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 5 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" #include "StdH.h" #include "ModelsMP/Enemies/Demon/Demon.h" #include #include #line 14 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" #define REMINDER_DEATTACH_FIREBALL 666 #define CLOSE_ATTACK_RANGE 10.0f #define DEMON_STRETCH 2.5f FLOAT3D vFireballLaunchPos = (FLOAT3D(0.06f, 2.6f, 0.15f)*DEMON_STRETCH); static FLOAT _tmLastStandingAnim =0.0f; // info structure static EntityInfo eiDemon = { EIBT_FLESH, 1600.0f, 0.0f, 2.0f, 0.0f, // source (eyes) 0.0f, 1.5f, 0.0f, // target (body) }; void CDemon::SetDefaultProperties(void) { m_iCounter = 0; m_penFireFX = NULL; CEnemyBase::SetDefaultProperties(); } #line 56 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" BOOL CDemon::HandleEvent(const CEntityEvent & ee) #line 57 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 61 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(ee . ee_slEvent == EVENTCODE_EReminder ) #line 62 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 63 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" EReminder eReminder = ((EReminder &) ee ); #line 64 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(eReminder . iValue == REMINDER_DEATTACH_FIREBALL ) #line 65 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 66 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" RemoveAttachment (DEMON_ATTACHMENT_FIREBALL ); #line 67 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 68 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return TRUE ; #line 69 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 70 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return CEnemyBase :: HandleEvent (ee ); #line 71 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } CTString CDemon::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath) #line 75 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 76 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" CTString str ; #line 77 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" str . PrintF (TRANS ("A Demon executed %s") , strPlayerName ); #line 78 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return str ; #line 79 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } const CTFileName & CDemon::GetComputerMessageName(void)const { #line 82 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" static DECLARE_CTFILENAME (fnmDemon , "DataMP\\Messages\\Enemies\\Demon.txt"); #line 83 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return fnmDemon ; #line 84 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 86 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::Precache(void) { #line 87 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" CEnemyBase :: Precache (); #line 88 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheSound (SOUND_IDLE ); #line 89 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheSound (SOUND_SIGHT ); #line 90 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheSound (SOUND_WOUND ); #line 91 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheSound (SOUND_DEATH ); #line 92 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheSound (SOUND_CAST ); #line 93 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheModel (MODEL_DEMON ); #line 94 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheTexture (TEXTURE_DEMON ); #line 95 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheModel (MODEL_FIREBALL ); #line 96 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheTexture (TEXTURE_FIREBALL ); #line 97 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PrecacheClass (CLASS_PROJECTILE , PRT_BEAST_PROJECTILE ); #line 98 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 101 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void * CDemon::GetEntityInfo(void) { #line 102 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return & eiDemon ; #line 103 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 105 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" BOOL CDemon::ForcesCannonballToExplode(void) #line 106 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 107 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return TRUE ; #line 108 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 119 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType, #line 120 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection) #line 121 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 123 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(dmtType == DMT_BULLET && fDamageAmmount > 100.0f) #line 124 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 125 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" fDamageAmmount *= 0.5f; #line 126 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 129 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(! IsOfClass (penInflictor , "Demon")){ #line 130 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection ); #line 131 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 132 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 136 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" INDEX CDemon::AnimForDamage(FLOAT fDamage) { #line 137 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" RemoveAttachment (DEMON_ATTACHMENT_FIREBALL ); #line 138 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StartModelAnim (DEMON_ANIM_WOUND , 0); #line 139 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return DEMON_ANIM_WOUND ; #line 140 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 143 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" INDEX CDemon::AnimForDeath(void) { #line 144 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(m_penFireFX != NULL ) #line 145 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 146 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_penFireFX -> SendEvent (EStop ()); #line 147 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_penFireFX = NULL ; #line 148 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 150 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" RemoveAttachment (DEMON_ATTACHMENT_FIREBALL ); #line 151 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StartModelAnim (DEMON_ANIM_DEATHFORWARD , 0); #line 152 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return DEMON_ANIM_DEATHFORWARD ; #line 153 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 155 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" FLOAT CDemon::WaitForDust(FLOAT3D & vStretch) #line 156 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 157 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" vStretch = FLOAT3D (1 , 1 , 2) * 3.0f; #line 158 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return 1.1f; #line 159 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 161 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::DeathNotify(void) { #line 162 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ChangeCollisionBoxIndexWhenPossible (DEMON_COLLISION_BOX_DEATH ); #line 163 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" en_fDensity = 500.0f; #line 164 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 167 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::StandingAnim(void) { #line 169 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StartModelAnim (DEMON_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART ); #line 170 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 172 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::WalkingAnim(void) { #line 178 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" RunningAnim (); #line 179 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 181 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::RunningAnim(void) { #line 182 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StartModelAnim (DEMON_ANIM_RUN , AOF_LOOPING | AOF_NORESTART ); #line 183 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 184 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::RotatingAnim(void) { #line 185 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StartModelAnim (DEMON_ANIM_RUN , AOF_LOOPING | AOF_NORESTART ); #line 186 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 189 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::IdleSound(void) { #line 190 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PlaySound (m_soSound , SOUND_IDLE , SOF_3D ); #line 191 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 192 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::SightSound(void) { #line 193 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PlaySound (m_soSound , SOUND_SIGHT , SOF_3D ); #line 194 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 195 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::WoundSound(void) { #line 196 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PlaySound (m_soSound , SOUND_WOUND , SOF_3D ); #line 197 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 198 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::DeathSound(void) { #line 199 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PlaySound (m_soSound , SOUND_DEATH , SOF_3D ); #line 200 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 204 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" void CDemon::EnemyPostInit(void) #line 205 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 206 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_soSound . Set3DParameters (160.0f , 50.0f , 2.0f , 1.0f); #line 207 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } BOOL CDemon:: #line 213 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" Fire(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CDemon_Fire ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CDemon::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 217 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(m_fMoveSpeed > 0.0f){ #line 218 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , - m_fMoveSpeed )); #line 219 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 222 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StartModelAnim (DEMON_ANIM_ATTACK , 0); #line 223 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" STATE_CMovableModelEntity_WaitUntilScheduledAnimStarts, FALSE; Jump(STATE_CURRENT, 0x01500001, FALSE, EBegin());return TRUE;}BOOL CDemon::H0x01500001_Fire_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01500001 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CMovableModelEntity_WaitUntilScheduledAnimStarts, FALSE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01500002, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CDemon::H0x01500002_Fire_02(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x01500002 const EReturn&__e= (EReturn&)__eeInput; ; #line 225 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f)); #line 227 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PlaySound (m_soSound , SOUND_CAST , SOF_3D ); #line 228 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SpawnReminder (this , 3.0f , REMINDER_DEATTACH_FIREBALL ); #line 230 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetTimerAfter(1.0f); Jump(STATE_CURRENT, 0x01500003, FALSE, EBegin());return TRUE;}BOOL CDemon::H0x01500003_Fire_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01500003 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01500004, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CDemon::H0x01500004_Fire_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01500004 ; #line 233 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" CPlacement3D plFX = GetPlacement (); #line 234 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" const FLOATmatrix3D & m = GetRotationMatrix (); #line 235 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" plFX . pl_PositionVector = plFX . pl_PositionVector + vFireballLaunchPos * m ; #line 236 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ESpawnEffect ese ; #line 237 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ese . colMuliplier = C_WHITE | CT_OPAQUE ; #line 238 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ese . betType = BET_COLLECT_ENERGY ; #line 239 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ese . vStretch = FLOAT3D (1.0f , 1.0f , 1.0f); #line 240 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_penFireFX = CreateEntity (plFX , CLASS_BASIC_EFFECT ); #line 241 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_penFireFX -> Initialize (ese ); #line 243 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetTimerAfter(1.4f); Jump(STATE_CURRENT, 0x01500005, FALSE, EBegin());return TRUE;}BOOL CDemon::H0x01500005_Fire_05(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01500005 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01500006, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CDemon::H0x01500006_Fire_06(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01500006 ; #line 245 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" AddAttachment (DEMON_ATTACHMENT_FIREBALL , MODEL_FIREBALL , TEXTURE_FIREBALL ); #line 246 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" CModelObject * pmoFire = & GetModelObject () -> GetAttachmentModel (DEMON_ATTACHMENT_FIREBALL ) -> amo_moModelObject ; #line 247 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" pmoFire -> StretchModel (FLOAT3D (DEMON_STRETCH , DEMON_STRETCH , DEMON_STRETCH )); #line 248 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetTimerAfter(2.94f - 2.4f); Jump(STATE_CURRENT, 0x01500007, FALSE, EBegin());return TRUE;}BOOL CDemon::H0x01500007_Fire_07(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01500007 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01500008, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CDemon::H0x01500008_Fire_08(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01500008 ; #line 250 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" RemoveAttachment (DEMON_ATTACHMENT_FIREBALL ); #line 251 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" MaybeSwitchToAnotherPlayer (); #line 253 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(IsVisible (m_penEnemy )){ #line 254 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ShootProjectile (PRT_DEMON_FIREBALL , vFireballLaunchPos , ANGLE3D (0.0f , 0.0f , 0.0f)); #line 255 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 256 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" else { #line 257 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ShootProjectileAt (m_vPlayerSpotted , PRT_DEMON_FIREBALL , vFireballLaunchPos , ANGLE3D (0.0f , 0.0f , 0.0f)); #line 258 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 260 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetTimerAfter(1.0f); Jump(STATE_CURRENT, 0x01500009, FALSE, EBegin());return TRUE;}BOOL CDemon::H0x01500009_Fire_09(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01500009 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0150000a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CDemon::H0x0150000a_Fire_10(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0150000a ; #line 262 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" Return(STATE_CURRENT,EReturn ()); #line 262 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CDemon:: #line 265 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" Hit(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CDemon_Hit ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CDemon::Hit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 267 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(!(CalcDist (m_penEnemy ) < 6.0f)){ Jump(STATE_CURRENT,0x01500011, FALSE, EInternal());return TRUE;} #line 268 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StartModelAnim (DEMON_ANIM_WOUND , 0); #line 269 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetTimerAfter(0.45f); Jump(STATE_CURRENT, 0x0150000c, FALSE, EBegin());return TRUE;}BOOL CDemon::H0x0150000c_Hit_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0150000c switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0150000d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CDemon::H0x0150000d_Hit_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0150000d ; #line 270 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" PlaySound (m_soSound , SOUND_WOUND , SOF_3D ); #line 271 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" if(CalcDist (m_penEnemy ) < CLOSE_ATTACK_RANGE #line 272 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" && IsInPlaneFrustum (m_penEnemy , CosFast (60.0f))) #line 273 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" { #line 274 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" FLOAT3D vDirection = m_penEnemy -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ; #line 275 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" vDirection . Normalize (); #line 276 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" InflictDirectDamage (m_penEnemy , this , DMT_CLOSERANGE , 50.0f , FLOAT3D (0 , 0 , 0) , vDirection ); #line 277 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" } #line 278 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetTimerAfter(1.5f); Jump(STATE_CURRENT, 0x0150000e, FALSE, EBegin());return TRUE;}BOOL CDemon::H0x0150000e_Hit_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0150000e switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0150000f, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CDemon::H0x0150000f_Hit_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0150000f ; #line 279 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" MaybeSwitchToAnotherPlayer ();Jump(STATE_CURRENT,0x01500010, FALSE, EInternal());return TRUE;}BOOL CDemon::H0x01500011_Hit_06(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01500011 { #line 282 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fShootTime = _pTimer -> CurrentTick () + 0.5f; #line 283 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" }Jump(STATE_CURRENT,0x01500010, FALSE, EInternal());return TRUE;} BOOL CDemon::H0x01500010_Hit_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01500010 #line 284 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" Return(STATE_CURRENT,EReturn ()); #line 284 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CDemon:: #line 291 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" Main(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CDemon_Main ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CDemon::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 293 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" InitAsModel (); #line 294 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetPhysicsFlags (EPF_MODEL_WALKING ); #line 295 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetCollisionFlags (ECF_MODEL ); #line 296 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetFlags (GetFlags () | ENF_ALIVE ); #line 298 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" en_fDensity = 1100.0f; #line 300 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetModel (MODEL_DEMON ); #line 301 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" StandingAnim (); #line 303 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fWalkSpeed = FRnd () / 1.0f + 12.0f; #line 304 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_aWalkRotateSpeed = AngleDeg (FRnd () * 20.0f + 50.0f); #line 305 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fCloseRunSpeed = FRnd () / 1.0f + 13.0f; #line 306 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_aCloseRotateSpeed = AngleDeg (FRnd () * 100 + 900.0f); #line 307 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fAttackRunSpeed = FRnd () / 1.0f + 9.0f; #line 308 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_aAttackRotateSpeed = AngleDeg (FRnd () * 100.0f + 900.0f); #line 310 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fAttackDistance = 650.0f; #line 311 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fCloseDistance = 12.0f; #line 312 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fStopDistance = 0.0f; #line 313 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fAttackFireTime = 5.0f; #line 314 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fCloseFireTime = 1.0f; #line 315 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fIgnoreRange = 800.0f; #line 316 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fStopDistance = 5.0f; #line 317 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_tmGiveUp = Max (m_tmGiveUp , 10.0f); #line 320 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetHealth (500.0f); #line 321 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fMaxHealth = GetHealth (); #line 322 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" SetModelMainTexture (TEXTURE_DEMON ); #line 323 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fBlowUpAmount = 10000.0f; #line 324 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fBodyParts = 4; #line 325 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fDamageWounded = 1000.0f; #line 326 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_iScore = 5000; #line 327 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" m_fLockOnEnemyTime = 3.0f; #line 330 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" GetModelObject () -> StretchModel (FLOAT3D (4.2f , 4.2f , 4.2f)); #line 331 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" ModelChangeNotify (); #line 334 "D:/SE1_GPL/Sources/EntitiesMP/Demon.es" Jump(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};