mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-25 19:55:54 +01:00
1087 lines
53 KiB
C++
1087 lines
53 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
|
|
#include "StdH.h"
|
|
#include "ModelsMP/Enemies/AirElemental/AirElemental.h"
|
|
#include "ModelsMP/Enemies/AirElemental/Elemental.h"
|
|
#include "Models/Enemies/Elementals/Twister.h"
|
|
|
|
#include <EntitiesMP/AirElemental.h>
|
|
#include <EntitiesMP/AirElemental_tables.h>
|
|
CEntityEvent *EElementalGrow::MakeCopy(void) { CEntityEvent *peeCopy = new EElementalGrow(*this); return peeCopy;}
|
|
EElementalGrow::EElementalGrow() : CEntityEvent(EVENTCODE_EElementalGrow) {;
|
|
};
|
|
#line 18 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
|
|
#define ECF_AIR ( \
|
|
((ECBI_BRUSH|ECBI_MODEL|ECBI_CORPSE|ECBI_ITEM|ECBI_PROJECTILE_MAGIC|ECBI_PROJECTILE_SOLID)<<ECB_TEST) |\
|
|
((ECBI_MODEL|ECBI_CORPSE|ECBI_ITEM|ECBI_PROJECTILE_MAGIC|ECBI_PROJECTILE_SOLID)<<ECB_PASS) |\
|
|
((ECBI_MODEL)<<ECB_IS))
|
|
|
|
#define AIRBOSS_EYES_HEIGHT 1.7f
|
|
#define AIRBOSS_BODY_HEIGHT 1.0f
|
|
|
|
// info structure
|
|
static EntityInfo eiAirElemental = {
|
|
EIBT_AIR, 1500.0f,
|
|
0.0f, AIRBOSS_EYES_HEIGHT, 0.0f,
|
|
0.0f, AIRBOSS_BODY_HEIGHT, 0.0f,
|
|
};
|
|
|
|
#define RAND_05 (FLOAT(rand())/RAND_MAX-0.5f)
|
|
#define FIREPOS_TWISTER FLOAT3D(-0.04f, 0.91f, -1.06f)
|
|
#define SIZE_NORMAL 1
|
|
#define SIZE_BIG01 2
|
|
#define SIZE_BIG02 3
|
|
#define SIZE_BIG03 4
|
|
|
|
#define AIRBOSS_MAX_TA 10
|
|
#define AIRBOSS_MAX_GA 3
|
|
|
|
FLOAT afTriggerArray[AIRBOSS_MAX_TA] = { 0.9f, 0.8f, 0.7f, 0.6f, 0.5f,
|
|
0.4f, 0.3f, 0.2f, 0.1f, 0.05f };
|
|
FLOAT afGrowArray[AIRBOSS_MAX_GA][2] = { 0.8f, 25.0f,
|
|
0.6f, 50.0f,
|
|
0.4f, 100.0f };
|
|
|
|
void CAirElemental::SetDefaultProperties(void) {
|
|
m_bFloat = FALSE ;
|
|
m_fAttPosY = 0.0f;
|
|
m_bInitialAnim = FALSE ;
|
|
m_penTrigger01 = NULL;
|
|
m_penTrigger02 = NULL;
|
|
m_penTrigger03 = NULL;
|
|
m_penTrigger04 = NULL;
|
|
m_penTrigger05 = NULL;
|
|
m_penTrigger06 = NULL;
|
|
m_penTrigger07 = NULL;
|
|
m_penTrigger08 = NULL;
|
|
m_penTrigger09 = NULL;
|
|
m_penTrigger10 = NULL;
|
|
m_fAttSizeCurrent = 0.0f;
|
|
m_fAttSizeBegin = 12.5f;
|
|
m_fAttSizeEnd = 100.0f;
|
|
m_fAttSizeRequested = 0.0f;
|
|
m_bAttGrow = FALSE ;
|
|
m_iSize = 0;
|
|
m_fLastSize = 0.0f;
|
|
m_fTargetSize = 0.0f;
|
|
m_fGrowSpeed = 2.0f;
|
|
m_tmWindNextFire = 0.0f;
|
|
m_fWindFireTimeMin = 10.0f;
|
|
m_fWindFireTimeMax = 20.0f;
|
|
m_iWind = 0;
|
|
m_bDying = FALSE ;
|
|
m_tmDeath = 1e6f;
|
|
m_fDeathDuration = 0.0f;
|
|
m_fWindBlastFirePosBegin = FLOAT3D(- 0.44f , 0.7f , - 0.94f);
|
|
m_fWindBlastFirePosEnd = FLOAT3D(0.64f , 0.37f , - 0.52f);
|
|
m_tmLastAnimation = 0.0f;
|
|
m_penDeathInflictor = NULL;
|
|
m_bRenderParticles = FALSE ;
|
|
m_soFire.SetOwner(this);
|
|
m_soFire.Stop_internal();
|
|
m_soVoice.SetOwner(this);
|
|
m_soVoice.Stop_internal();
|
|
m_colParticles = COLOR(C_WHITE | CT_OPAQUE );
|
|
CEnemyBase::SetDefaultProperties();
|
|
}
|
|
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::Read_t(CTStream * istr)
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEnemyBase :: Read_t (istr );
|
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_emEmiter . Read_t (* istr );
|
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::Write_t(CTStream * istr)
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEnemyBase :: Write_t (istr );
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_emEmiter . Write_t (* istr );
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
CTString CAirElemental::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath)
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CTString str ;
|
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
str . PrintF (TRANS ("%s was -*blown away*- by an Air Elemental") , strPlayerName );
|
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return str ;
|
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
const CTFileName & CAirElemental::GetComputerMessageName(void)const {
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
static DECLARE_CTFILENAME (fnm , "DataMP\\Messages\\Enemies\\AirElemental.txt");
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return fnm ;
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::Precache(void)
|
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEnemyBase :: Precache ();
|
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheClass (CLASS_TWISTER );
|
|
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheClass (CLASS_BLOOD_SPRAY );
|
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheClass (CLASS_PROJECTILE , PRT_AIRELEMENTAL_WIND );
|
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheModel (MODEL_INVISIBLE );
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheModel (MODEL_ELEMENTAL );
|
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheTexture (TEXTURE_ELEMENTAL );
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheSound (SOUND_FIREWINDBLAST );
|
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheSound (SOUND_FIRETWISTER );
|
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheSound (SOUND_ROAR );
|
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheSound (SOUND_DEATH );
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrecacheSound (SOUND_EXPLOSION );
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void * CAirElemental::GetEntityInfo(void) {
|
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return & eiAirElemental ;
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CModelObject * CAirElemental::ElementalModel(void) {
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CAttachmentModelObject & amo0 = * GetModelObject () -> GetAttachmentModel (AIRELEMENTAL_ATTACHMENT_BODY );
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return & (amo0 . amo_moModelObject );
|
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_bInitialAnim ){return ;}
|
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fHealth = GetHealth ();
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fFullDamage = fDamageAmmount * DamageStrength (((EntityInfo *) GetEntityInfo ()) -> Eeibt , dmtType ) * GetGameDamageMultiplier ();
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_bAttGrow && m_iSize < 2){
|
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(fHealth - fFullDamage < afGrowArray [ m_iSize + 1 ] [ 0 ] * m_fMaxHealth ){
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetHealth (fHealth );
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return ;
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}else if(m_bAttGrow && m_iSize == 2){
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(fHealth - fFullDamage < 1.0f){
|
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetHealth (fHealth );
|
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return ;
|
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 226 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(IsOfClass (penInflictor , "AirElemental")){
|
|
#line 227 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return ;
|
|
#line 228 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(dmtType == DMT_TELEPORT )
|
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return ;
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(dmtType == DMT_CLOSERANGE ||
|
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
dmtType == DMT_BULLET ||
|
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
dmtType == DMT_IMPACT ||
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
dmtType == DMT_CHAINSAW )
|
|
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return ;
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(dmtType == DMT_CANNONBALL )
|
|
#line 247 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
fDamageAmmount *= 0.6f;
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fOldHealth = GetHealth ();
|
|
#line 252 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEnemyBase :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fNewHealth = GetHealth ();
|
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEntityPointer * penTrigger = & m_penTrigger01 ;
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
INDEX i = 0;
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
for(i = 0;i < AIRBOSS_MAX_TA ;i ++){
|
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fHealth = afTriggerArray [ i ] * m_fMaxHealth ;
|
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(fHealth <= fOldHealth && fHealth > fNewHealth )
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(& * penTrigger [ i ]){
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SendToTarget (& * penTrigger [ i ] , EET_TRIGGER , FixupCausedToPlayer (this , m_penEnemy ));
|
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
for(i = 0;i < AIRBOSS_MAX_GA ;i ++){
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fHealth = afGrowArray [ i ] [ 0 ] * m_fMaxHealth ;
|
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(fHealth <= fOldHealth && fHealth > fNewHealth )
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fAttSizeRequested = afGrowArray [ i ] [ 1 ];
|
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_iSize = i ;
|
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
EElementalGrow eeg ;
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SendEvent (eeg );
|
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_colBurning = COLOR (C_WHITE | CT_OPAQUE );
|
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
INDEX CAirElemental::AnimForDamage(FLOAT fDamage) {
|
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
INDEX iAnim = ELEMENTAL_ANIM_IDLE ;
|
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (iAnim , 0);
|
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return iAnim ;
|
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::StandingAnimFight(void) {
|
|
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART );
|
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::StandingAnim(void) {
|
|
#line 299 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART );
|
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::WalkingAnim(void)
|
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART );
|
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::RunningAnim(void)
|
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
WalkingAnim ();
|
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::RotatingAnim(void) {
|
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
WalkingAnim ();
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
INDEX CAirElemental::AnimForDeath(void)
|
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
INDEX iAnim ;
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
iAnim = ELEMENTAL_ANIM_IDLE ;
|
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (iAnim , 0);
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return iAnim ;
|
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::IdleSound(void) {
|
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::WoundSound(void) {
|
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::SizeModel(void)
|
|
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return ;
|
|
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
BOOL CAirElemental::AdjustShadingParameters(FLOAT3D & vLightDirection,COLOR & colLight,COLOR & colAmbient) {
|
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return CMovableModelEntity :: AdjustShadingParameters (vLightDirection , colLight , colAmbient );
|
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 347 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::BlowUp(void) {
|
|
#line 363 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 367 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::EnemyPostInit(void)
|
|
#line 368 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 369 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_soFire . Set3DParameters (600.0f , 150.0f , 2.0f , 1.0f);
|
|
#line 370 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_soVoice . Set3DParameters (600.0f , 150.0f , 2.0f , 1.0f);
|
|
#line 371 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_soSound . Set3DParameters (600.0f , 150.0f , 2.0f , 1.0f);
|
|
#line 372 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 374 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::LaunchTwister(FLOAT3D vEnemyOffset)
|
|
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vFirePos = FIREPOS_TWISTER * m_fAttSizeCurrent * GetRotationMatrix ();
|
|
#line 378 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vShooting = GetPlacement () . pl_PositionVector + vFirePos ;
|
|
#line 379 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vTarget = m_penEnemy -> GetPlacement () . pl_PositionVector ;
|
|
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fLaunchSpeed ;
|
|
#line 381 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fRelativeHdg ;
|
|
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
EntityInfo * peiTarget = (EntityInfo *) (m_penEnemy -> GetEntityInfo ());
|
|
#line 387 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vTarget += vEnemyOffset ;
|
|
#line 389 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CPlacement3D pl ;
|
|
#line 390 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CalculateAngularLaunchParams (vShooting , peiTarget -> vTargetCenter [ 1 ] - 6.0f / 3.0f ,
|
|
#line 391 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vTarget , FLOAT3D (0.0f , 0.0f , 0.0f) , 0.0f , fLaunchSpeed , fRelativeHdg );
|
|
#line 393 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PrepareFreeFlyingProjectile (pl , vTarget , vFirePos , ANGLE3D (fRelativeHdg , 0.0f , 0.0f));
|
|
#line 395 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ETwister et ;
|
|
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEntityPointer penTwister = CreateEntity (pl , CLASS_TWISTER );
|
|
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
et . penOwner = this ;
|
|
#line 399 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
et . fSize = FRnd () * 10.0f + m_fAttSizeCurrent / 5.0f + 3.0f;
|
|
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
et . fDuration = 15.0f + FRnd () + 5.0f;
|
|
#line 401 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
et . sgnSpinDir = (INDEX) (Sgn (FRnd () - 0.5f));
|
|
#line 402 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
et . bGrow = TRUE ;
|
|
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
et . bMovingAllowed = TRUE ;
|
|
#line 404 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
penTwister -> Initialize (et );
|
|
#line 406 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
((CMovableEntity &) * penTwister ) . LaunchAsFreeProjectile (FLOAT3D (0.0f , 0.0f , - fLaunchSpeed ) , (CMovableEntity *) (CEntity *) this );
|
|
#line 407 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 409 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::PreMoving() {
|
|
#line 432 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CEnemyBase :: PreMoving ();
|
|
#line 433 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 435 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::GetAirElementalAttachmentData(INDEX iAttachment,FLOATmatrix3D & mRot,FLOAT3D & vPos)
|
|
#line 436 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 437 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
MakeRotationMatrixFast (mRot , ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 438 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vPos = FLOAT3D (0.0f , 0.0f , 0.0f);
|
|
#line 439 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
GetModelObject () -> GetAttachmentTransformations (AIRELEMENTAL_ATTACHMENT_BODY , mRot , vPos , FALSE );
|
|
#line 441 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CAttachmentModelObject * pamo = GetModelObject () -> GetAttachmentModel (AIRELEMENTAL_ATTACHMENT_BODY );
|
|
#line 442 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
pamo -> amo_moModelObject . GetAttachmentTransformations (iAttachment , mRot , vPos , TRUE );
|
|
#line 443 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vPos = GetPlacement () . pl_PositionVector + vPos * GetRotationMatrix ();
|
|
#line 444 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 446 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT CAirElemental::GetCurrentStretchRatio(void)
|
|
#line 447 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 448 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CAttachmentModelObject & amo = * GetModelObject () -> GetAttachmentModel (AIRELEMENTAL_ATTACHMENT_BODY );
|
|
#line 449 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fCurrentStretch = amo . amo_moModelObject . mo_Stretch (1);
|
|
#line 450 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fStretch = (fCurrentStretch - m_fAttSizeBegin ) / (m_fAttSizeEnd - m_fAttSizeBegin );
|
|
#line 451 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return fStretch ;
|
|
#line 452 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
|
|
#line 454 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
void CAirElemental::RenderParticles(void)
|
|
#line 455 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 456 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
static TIME tmLastGrowTime = 0.0f;
|
|
#line 458 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_bFloat ){
|
|
#line 459 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fTime = _pTimer -> GetLerpedCurrentTick ();
|
|
#line 460 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CAttachmentModelObject & amo0 = * GetModelObject () -> GetAttachmentModel (AIRELEMENTAL_ATTACHMENT_BODY );
|
|
#line 461 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
amo0 . amo_plRelative . pl_PositionVector (2) = m_fAttPosY + pow (sin (fTime * 2.0f) , 2.0f) * m_fAttSizeCurrent * 2.0f / m_fAttSizeBegin ;
|
|
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 463 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_bAttGrow ){
|
|
#line 464 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fSize = Lerp (m_fLastSize , m_fTargetSize , _pTimer -> GetLerpFactor ());
|
|
#line 465 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> StretchModel (FLOAT3D (fSize , fSize , fSize ));
|
|
#line 466 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 468 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_bRenderParticles )
|
|
#line 469 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
#line 470 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fStretchRatio = GetCurrentStretchRatio ();
|
|
#line 471 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fStretch = 1.0f + (fStretchRatio ) * 6.0f;
|
|
#line 472 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Particles_AirElemental (this , fStretch , 1.0f , m_tmDeath , m_colParticles );
|
|
#line 473 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 474 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
BOOL CAirElemental::
|
|
#line 479 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Die(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAirElemental_Die
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDeath, "CAirElemental::Die expects 'EDeath' as input!"); const EDeath &eDeath = (const EDeath &)__eeInput;
|
|
#line 481 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 482 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PlaySound (m_soFire , SOUND_DEATH , SOF_3D );
|
|
#line 483 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_DEATH , AOF_NORESTART );
|
|
#line 484 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_tmDeath = _pTimer -> CurrentTick () + ElementalModel () -> GetAnimLength (ELEMENTAL_ANIM_DEATH );
|
|
#line 485 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bFloat = FALSE ;
|
|
#line 486 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(ElementalModel () -> GetAnimLength (ELEMENTAL_ANIM_DEATH ) - 0.1f);
|
|
Jump(STATE_CURRENT, 0x015b0002, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0002_Die_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0002
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0003, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0003_Die_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0003
|
|
;
|
|
#line 488 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PlaySound (m_soVoice , SOUND_EXPLOSION , SOF_3D );
|
|
#line 489 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bDying = TRUE ;
|
|
#line 490 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fDeathDuration = 4.0f;
|
|
#line 492 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(m_fDeathDuration );
|
|
Jump(STATE_CURRENT, 0x015b0004, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0004_Die_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0004
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0005, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0005_Die_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0005
|
|
;
|
|
#line 494 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
EDeath eDeath ;
|
|
#line 495 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
eDeath . eLastDamage . penInflictor = m_penDeathInflictor ;
|
|
#line 496 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Jump(STATE_CURRENT, STATE_CEnemyBase_Die, FALSE, eDeath );return TRUE; ASSERT(FALSE); return TRUE;};BOOL CAirElemental::
|
|
#line 503 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Fire(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAirElemental_Fire
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CAirElemental::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 505 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(!(m_tmWindNextFire < _pTimer -> CurrentTick ())){ Jump(STATE_CURRENT,0x015b0011, FALSE, EInternal());return TRUE;}
|
|
#line 506 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_FIREPROJECTILES , AOF_NORESTART );
|
|
#line 507 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_iWind = 0;
|
|
#line 508 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PlaySound (m_soFire , SOUND_FIREWINDBLAST , SOF_3D );
|
|
#line 510 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(1.8f);
|
|
Jump(STATE_CURRENT, 0x015b0007, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0007_Fire_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0007
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0008, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0008_Fire_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0008
|
|
;
|
|
#line 511 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Jump(STATE_CURRENT,0x015b000b, FALSE, EInternal());return TRUE;}BOOL CAirElemental::H0x015b000b_Fire_05(const CEntityEvent &__eeInput)
|
|
#line 512 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b000b
|
|
if(!(m_iWind < 5)){ Jump(STATE_CURRENT,0x015b000c, FALSE, EInternal());return TRUE;}
|
|
#line 513 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vFirePos ;
|
|
#line 514 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vFirePos = Lerp (m_fWindBlastFirePosBegin * m_fAttSizeCurrent ,
|
|
#line 515 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fWindBlastFirePosEnd * m_fAttSizeCurrent ,
|
|
#line 516 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
(FLOAT) m_iWind * 0.25f);
|
|
#line 517 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ShootProjectile (PRT_AIRELEMENTAL_WIND , vFirePos ,
|
|
#line 518 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ANGLE3D (30.0f - m_iWind * 10.0 , 0.0f , 0.0f));
|
|
#line 519 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_iWind ++;
|
|
#line 520 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(0.1f);
|
|
Jump(STATE_CURRENT, 0x015b0009, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0009_Fire_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0009
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b000a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b000a_Fire_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b000a
|
|
;Jump(STATE_CURRENT,0x015b000b, FALSE, EInternal());return TRUE;
|
|
#line 521 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}BOOL CAirElemental::H0x015b000c_Fire_06(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b000c
|
|
|
|
#line 522 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_tmWindNextFire = _pTimer -> CurrentTick () + Lerp (m_fWindFireTimeMin , m_fWindFireTimeMax , FRnd ());
|
|
#line 524 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(ElementalModel () -> GetAnimLength (ELEMENTAL_ANIM_FIREPROJECTILES ) - 1.75f);
|
|
Jump(STATE_CURRENT, 0x015b000d, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b000d_Fire_07(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b000d
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b000e, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b000e_Fire_08(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b000e
|
|
;
|
|
#line 526 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_IDLE , AOF_LOOPING | AOF_SMOOTHCHANGE );
|
|
#line 528 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(0.05f);
|
|
Jump(STATE_CURRENT, 0x015b000f, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b000f_Fire_09(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b000f
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0010, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0010_Fire_10(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0010
|
|
;
|
|
#line 530 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 530 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return TRUE;Jump(STATE_CURRENT,0x015b0011, FALSE, EInternal());return TRUE;}BOOL CAirElemental::H0x015b0011_Fire_11(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0011
|
|
|
|
#line 533 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_FIRETWISTER , AOF_NORESTART );
|
|
#line 535 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PlaySound (m_soFire , SOUND_FIRETWISTER , SOF_3D );
|
|
#line 536 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(4.0f);
|
|
Jump(STATE_CURRENT, 0x015b0012, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0012_Fire_12(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0012
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0013, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0013_Fire_13(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0013
|
|
;
|
|
#line 538 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vOffset ;
|
|
#line 540 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(((CMovableEntity &) * m_penEnemy ) . en_vCurrentTranslationAbsolute . Length () == 0.0f){
|
|
#line 542 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vPlayerToThis = GetPlacement () . pl_PositionVector - m_penEnemy -> GetPlacement () . pl_PositionVector ;
|
|
#line 543 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vPlayerToThis . Normalize ();
|
|
#line 544 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vOffset = FLOAT3D (vPlayerToThis * (FRnd () * 10.0f + 5.0f));
|
|
#line 545 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
LaunchTwister (vOffset );
|
|
#line 547 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vOffset = FLOAT3D (- (FRnd () * 5.0f + 15.0f) , 0.0f , (FRnd () - 0.5f) * 20.0f) * ((CMovableEntity &) * m_penEnemy ) . GetRotationMatrix ();
|
|
#line 548 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
LaunchTwister (vOffset );
|
|
#line 550 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vOffset = FLOAT3D (+ (FRnd () * 5.0f + 15.0f) , 0.0f , 20.0f) * ((CMovableEntity &) * m_penEnemy ) . GetRotationMatrix ();
|
|
#line 551 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
LaunchTwister (vOffset );
|
|
#line 553 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}else {
|
|
#line 554 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vPlayerSpeed = ((CMovableEntity &) * m_penEnemy ) . en_vCurrentTranslationAbsolute ;
|
|
#line 555 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(vPlayerSpeed . Length () > 15.0f){
|
|
#line 556 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vPlayerSpeed . Normalize ();
|
|
#line 557 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vPlayerSpeed = vPlayerSpeed * 15.0f;
|
|
#line 558 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 559 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vOffset = vPlayerSpeed * (2.0f + FRnd ());
|
|
#line 560 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vToPlayer = ((CMovableEntity &) * m_penEnemy ) . GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ;
|
|
#line 561 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vToPlayer . Normalize ();
|
|
#line 562 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vToPlayer *= 15.0f + FRnd () * 5.0f;
|
|
#line 563 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vOffset -= vToPlayer ;
|
|
#line 564 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
LaunchTwister (vOffset );
|
|
#line 566 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
LaunchTwister (FLOAT3D (0.0f , 0.0f , 0.0f));
|
|
#line 567 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
LaunchTwister (vOffset + FLOAT3D (+ 5.0f + FRnd () * 5.0f , 0.0f , - 15.0f - FRnd () * 5.0f));
|
|
#line 568 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 572 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(ElementalModel () -> GetAnimLength (ELEMENTAL_ANIM_FIRETWISTER ) - 4.0f);
|
|
Jump(STATE_CURRENT, 0x015b0014, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0014_Fire_14(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0014
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0015, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0015_Fire_15(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0015
|
|
;
|
|
#line 574 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_IDLE , AOF_LOOPING | AOF_SMOOTHCHANGE );
|
|
#line 575 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(0.05f);
|
|
Jump(STATE_CURRENT, 0x015b0016, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0016_Fire_16(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0016
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0017, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0017_Fire_17(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0017
|
|
;
|
|
#line 577 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 577 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CAirElemental::
|
|
#line 580 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Hit(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAirElemental_Hit
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CAirElemental::Hit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 581 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Jump(STATE_CURRENT, STATE_CAirElemental_Fire, TRUE, EVoid());return TRUE;
|
|
#line 582 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 582 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CAirElemental::
|
|
#line 588 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Death(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAirElemental_Death
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CAirElemental::Death expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 590 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fFadeStartTime = _pTimer -> CurrentTick ();
|
|
#line 591 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bFadeOut = TRUE ;
|
|
#line 592 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fFadeTime = 2.0f;
|
|
#line 593 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(m_fFadeTime );
|
|
Jump(STATE_CURRENT, 0x015b001a, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b001a_Death_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b001a
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b001b, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b001b_Death_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b001b
|
|
;
|
|
#line 594 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
STATE_CEnemyBase_Death, FALSE;
|
|
Jump(STATE_CURRENT, 0x015b001c, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b001c_Death_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b001c
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_Death, FALSE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x015b001d, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b001d_Death_04(const CEntityEvent &__eeInput){
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b001d
|
|
const EEnd&__e= (EEnd&)__eeInput;
|
|
;
|
|
#line 596 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Return(STATE_CURRENT,EEnd ());
|
|
#line 596 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CAirElemental::
|
|
#line 603 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Grow(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAirElemental_Grow
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CAirElemental::Grow expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 605 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ASSERT (m_fAttSizeRequested > m_fAttSizeCurrent );
|
|
#line 606 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fLastSize = m_fTargetSize = m_fAttSizeCurrent ;
|
|
#line 608 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
PlaySound (m_soSound , SOUND_ROAR , SOF_3D );
|
|
#line 609 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_IDLE , AOF_NORESTART );
|
|
#line 612 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 613 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bAttGrow = TRUE ;
|
|
#line 614 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Jump(STATE_CURRENT,0x015b0021, FALSE, EInternal());return TRUE;}BOOL CAirElemental::H0x015b0021_Grow_03(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0021
|
|
if(!(m_fLastSize < m_fAttSizeRequested )){ Jump(STATE_CURRENT,0x015b0022, FALSE, EInternal());return TRUE;}
|
|
#line 616 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_penEnemy ){
|
|
#line 617 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT3D vToTarget ;
|
|
#line 618 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ANGLE3D aToTarget ;
|
|
#line 619 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vToTarget = m_penEnemy -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ;
|
|
#line 620 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
vToTarget . Normalize ();
|
|
#line 621 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
DirectionVectorToAngles (vToTarget , aToTarget );
|
|
#line 622 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
aToTarget (1) = aToTarget (1) - GetPlacement () . pl_OrientationAngle (1);
|
|
#line 623 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
aToTarget (1) = NormalizeAngle (aToTarget (1));
|
|
#line 624 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetDesiredRotation (FLOAT3D (aToTarget (1) / 2.0f , 0.0f , 0.0f));
|
|
#line 625 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 628 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fLastSize = m_fTargetSize ;
|
|
#line 629 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fTargetSize += m_fGrowSpeed * _pTimer -> TickQuantum ;
|
|
#line 636 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
FLOAT fMiddleSize = Lerp (m_fAttSizeCurrent , m_fAttSizeRequested , 0.33f);
|
|
#line 637 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_fLastSize <= fMiddleSize && fMiddleSize < m_fTargetSize ){
|
|
#line 638 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_iSize < 2){
|
|
#line 639 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ChangeCollisionBoxIndexWhenPossible (m_iSize + 1);
|
|
#line 640 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}else if(TRUE ){
|
|
#line 641 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ForceCollisionBoxIndexChange (m_iSize + 1);
|
|
#line 642 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 643 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 645 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(_pTimer -> TickQuantum );
|
|
Jump(STATE_CURRENT, 0x015b001f, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b001f_Grow_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b001f
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0020, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0020_Grow_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0020
|
|
;Jump(STATE_CURRENT,0x015b0021, FALSE, EInternal());return TRUE;
|
|
#line 646 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}BOOL CAirElemental::H0x015b0022_Grow_04(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0022
|
|
|
|
#line 647 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bAttGrow = FALSE ;
|
|
#line 649 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fAttSizeCurrent = afGrowArray [ m_iSize ] [ 1 ];
|
|
#line 651 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fGrowSpeed *= 2.0f;
|
|
#line 652 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
if(m_iSize == 1){
|
|
#line 653 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
GetModelObject () -> PlayAnim (AIRELEMENTAL_ANIM_SIZE50 , AOF_LOOPING );
|
|
#line 654 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}
|
|
#line 656 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Jump(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CAirElemental::
|
|
#line 659 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalLoop(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAirElemental_ElementalLoop
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CAirElemental::ElementalLoop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 660 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x015b0024, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0024_ElementalLoop_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0024
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):
|
|
#line 662 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{const EBegin&e= (EBegin&)__eeInput;
|
|
|
|
#line 663 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Call(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE;
|
|
#line 664 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EElementalGrow):
|
|
#line 666 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
{const EElementalGrow&e= (EElementalGrow&)__eeInput;
|
|
|
|
#line 667 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Call(STATE_CURRENT, STATE_CAirElemental_Grow, TRUE, EVoid());return TRUE;
|
|
#line 668 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}ASSERT(FALSE);break;default:{
|
|
#line 670 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
return TRUE;
|
|
#line 671 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}ASSERT(FALSE);break;
|
|
#line 672 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}return TRUE;}BOOL CAirElemental::H0x015b0025_ElementalLoop_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0025
|
|
ASSERT(FALSE); return TRUE;};BOOL CAirElemental::
|
|
#line 675 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CAirElemental_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CAirElemental::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 678 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
InitAsEditorModel ();
|
|
#line 680 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetCollisionFlags (ECF_IMMATERIAL );
|
|
#line 681 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
|
#line 682 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetFlags (GetFlags () | ENF_ALIVE );
|
|
#line 684 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
en_fDensity = 10000.0f;
|
|
#line 685 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fDamageWounded = 1e6f;
|
|
#line 687 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_sptType = SPT_AIRSPOUTS ;
|
|
#line 688 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bBoss = TRUE ;
|
|
#line 689 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetHealth (15000.0f);
|
|
#line 690 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fMaxHealth = 15000.0f;
|
|
#line 692 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fWalkSpeed = 0.0f;
|
|
#line 693 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_aWalkRotateSpeed = AngleDeg (FRnd () * 10.0f + 245.0f);
|
|
#line 694 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fAttackRunSpeed = m_fWalkSpeed ;
|
|
#line 695 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_aAttackRotateSpeed = m_aWalkRotateSpeed ;
|
|
#line 696 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fCloseRunSpeed = m_fWalkSpeed ;
|
|
#line 697 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_aCloseRotateSpeed = m_aWalkRotateSpeed ;
|
|
#line 699 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fAttackDistance = 500.0f;
|
|
#line 700 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fCloseDistance = 60.0f;
|
|
#line 701 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fStopDistance = 30.0f;
|
|
#line 702 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fAttackFireTime = 4.0f;
|
|
#line 703 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fCloseFireTime = 4.0f;
|
|
#line 704 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fIgnoreRange = 1000.0f;
|
|
#line 705 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_iScore = 500000;
|
|
#line 707 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
eiAirElemental . vSourceCenter [ 1 ] = AIRBOSS_EYES_HEIGHT * m_fAttSizeBegin ;
|
|
#line 708 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
eiAirElemental . vTargetCenter [ 1 ] = AIRBOSS_BODY_HEIGHT * m_fAttSizeBegin ;
|
|
#line 711 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetModel (MODEL_INVISIBLE );
|
|
#line 712 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , AIRELEMENTAL_ATTACHMENT_BODY , MODEL_ELEMENTAL , TEXTURE_ELEMENTAL , 0 , 0 , TEXTURE_DETAIL_ELEM );
|
|
#line 713 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
CAttachmentModelObject & amo0 = * GetModelObject () -> GetAttachmentModel (AIRELEMENTAL_ATTACHMENT_BODY );
|
|
#line 714 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fAttPosY = amo0 . amo_plRelative . pl_PositionVector (2);
|
|
#line 715 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
StandingAnim ();
|
|
#line 717 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_fAttSizeCurrent = m_fAttSizeBegin ;
|
|
#line 719 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
GetModelObject () -> StretchModel (FLOAT3D (1.0f , 1.0f , 1.0f));
|
|
#line 720 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ModelChangeNotify ();
|
|
#line 721 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> StretchModel (FLOAT3D (m_fAttSizeBegin , m_fAttSizeBegin , m_fAttSizeBegin ));
|
|
#line 723 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bRenderParticles = FALSE ;
|
|
#line 724 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(_pTimer -> TickQuantum );
|
|
Jump(STATE_CURRENT, 0x015b0026, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0026_Main_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0026
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b0027, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b0027_Main_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0027
|
|
;
|
|
#line 726 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_emEmiter . Initialize (this );
|
|
#line 727 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_emEmiter . em_etType = ET_AIR_ELEMENTAL ;
|
|
#line 729 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_tmDeath = 1e6f;
|
|
#line 746 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x015b0028, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b0028_Main_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0028
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETrigger):{const ETrigger&e= (ETrigger&)__eeInput;
|
|
UnsetTimer();Jump(STATE_CURRENT,0x015b0029, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
|
|
#line 750 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
}return TRUE;}BOOL CAirElemental::H0x015b0029_Main_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b0029
|
|
|
|
#line 752 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetCollisionFlags (ECF_AIR );
|
|
#line 753 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetPhysicsFlags (EPF_MODEL_WALKING );
|
|
#line 755 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_RAISE , AOF_NORESTART );
|
|
#line 756 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bRenderParticles = TRUE ;
|
|
#line 758 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bInitialAnim = TRUE ;
|
|
#line 760 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
SetTimerAfter(ElementalModel () -> GetAnimLength (ELEMENTAL_ANIM_RAISE ));
|
|
Jump(STATE_CURRENT, 0x015b002a, FALSE, EBegin());return TRUE;}BOOL CAirElemental::H0x015b002a_Main_05(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b002a
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015b002b, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CAirElemental::H0x015b002b_Main_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015b002b
|
|
;
|
|
#line 762 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ChangeCollisionBoxIndexWhenPossible (AIRELEMENTAL_COLLISION_BOX_COLLISION01 );
|
|
#line 765 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
GetModelObject () -> PlayAnim (AIRELEMENTAL_ANIM_DEFAULT , AOF_LOOPING );
|
|
#line 767 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
ElementalModel () -> PlayAnim (ELEMENTAL_ANIM_IDLE , AOF_LOOPING );
|
|
#line 768 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bInitialAnim = FALSE ;
|
|
#line 769 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_bFloat = TRUE ;
|
|
#line 771 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
m_tmWindNextFire = _pTimer -> CurrentTick () + 10.0f;
|
|
#line 774 "D:/SE1_GPL/Sources/EntitiesMP/AirElemental.es"
|
|
Jump(STATE_CURRENT, STATE_CAirElemental_ElementalLoop, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;}; |