/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 4 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" #include "StdH.h" #include "EntitiesMP/Common/PathFinding.h" #include "EntitiesMP/NavigationMarker.h" #include "EntitiesMP/TacticsHolder.h" extern void JumpFromBouncer(CEntity *penToBounce, CEntity *penBouncer); extern INDEX ent_bReportBrokenChains; #include #include CEntityEvent *ERestartAttack::MakeCopy(void) { CEntityEvent *peeCopy = new ERestartAttack(*this); return peeCopy;} ERestartAttack::ERestartAttack() : CEntityEvent(EVENTCODE_ERestartAttack) {; }; CEntityEvent *EReconsiderBehavior::MakeCopy(void) { CEntityEvent *peeCopy = new EReconsiderBehavior(*this); return peeCopy;} EReconsiderBehavior::EReconsiderBehavior() : CEntityEvent(EVENTCODE_EReconsiderBehavior) {; }; CEntityEvent *EForceWound::MakeCopy(void) { CEntityEvent *peeCopy = new EForceWound(*this); return peeCopy;} EForceWound::EForceWound() : CEntityEvent(EVENTCODE_EForceWound) {; }; #line 45 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" #define MF_MOVEZ (1L<<0) #define MF_ROTATEH (1L<<1) #define MF_MOVEXZY (1L<<2) void CEnemyBase::SetDefaultProperties(void) { m_penWatcher = NULL; m_vStartPosition = FLOAT3D(0 , 0 , 0); m_penEnemy = NULL; m_ttTarget = TT_NONE ; m_strDescription = "Enemy base"; m_strName = "Enemy base"; m_soSound.SetOwner(this); m_soSound.Stop_internal(); m_vStartDirection = FLOAT3D(0 , 0 , - 1); m_bOnStartPosition = TRUE ; m_fFallHeight = 8.0f; m_fStepHeight = -1.0f; m_fSenseRange = 0.0f; m_fViewAngle = 360.0f; m_fWalkSpeed = 1.0f; m_aWalkRotateSpeed = AngleDeg(10.0f); m_fAttackRunSpeed = 1.0f; m_aAttackRotateSpeed = AngleDeg(10.0f); m_fCloseRunSpeed = 1.0f; m_aCloseRotateSpeed = AngleDeg(10.0f); m_fAttackDistance = 50.0f; m_fCloseDistance = 10.0f; m_fAttackFireTime = 2.0f; m_fCloseFireTime = 1.0f; m_fStopDistance = 0.0f; m_fIgnoreRange = 200.0f; m_fLockOnEnemyTime = 0.0f; m_fBlowUpAmount = 0.0f; m_fBodyParts = 4; m_fDamageWounded = 0.0f; m_vDamage = FLOAT3D(0 , 0 , 0); m_tmLastDamage = -1000.0f; m_bRobotBlowup = FALSE ; m_fBlowUpSize = 2.0f; m_fMoveTime = 0.0f; m_vDesiredPosition = FLOAT3D(0 , 0 , 0); m_dtDestination = DT_PLAYERCURRENT ; m_penPathMarker = NULL; m_vPlayerSpotted = FLOAT3D(0 , 0 , 0); m_fMoveFrequency = 0.0f; m_fMoveSpeed = 0.0f; m_aRotateSpeed = 0; m_fLockStartTime = 0.0f; m_fRangeLast = 0.0f; m_bFadeOut = FALSE ; m_fFadeStartTime = 0.0f; m_fFadeTime = 0.0f; m_fShootTime = 0.0f; m_fDamageConfused = 0.0f; m_iChargeHitAnimation = 0.0f; m_fChargeHitDamage = 0.0f; m_fChargeHitAngle = 0.0f; m_fChargeHitSpeed = 0.0f; m_penSpawnerTarget = NULL; m_penDeathTarget = NULL; m_eetDeathType = EET_TRIGGER ; m_bTemplate = FALSE ; m_fAttackRadius = 10000.0f; m_colColor = 0x00; m_bDeaf = FALSE ; m_bBlind = FALSE ; m_tmGiveUp = 5.0f; m_tmReflexMin = 0.0f; m_tmReflexMax = 0.0f; m_fActivityRange = 0.0f; m_bApplyRandomStretch = FALSE ; m_fRandomStretchFactor = 0.1f; m_fStretchMultiplier = 1.0f; m_fRandomStretchMultiplier = 1.0f; m_penMarker = NULL; m_penMainMusicHolder = NULL; m_tmLastFussTime = 0.0f; m_iScore = -100000; m_fMaxHealth = -1.0f; m_bBoss = FALSE ; m_fSpiritStartTime = 0.0f; m_tmSpraySpawned = 0.0f; m_fSprayDamage = 0.0f; m_penSpray = NULL; m_fMaxDamageAmmount = 0.0f; m_vLastStain = FLOAT3D(0 , 0 , 0); m_sptType = SPT_BLOOD ; m_penTacticsHolder = NULL; m_bTacticActive = FALSE ; m_tmTacticsActivation = 0.0f; m_vTacticsStartPosition = FLOAT3D(0 , 0 , 0); m_fTacticVar1 = 0.0f; m_fTacticVar2 = 0.0f; m_fTacticVar3 = 0.0f; m_fTacticVar4 = 0.0f; m_fTacticVar5 = 0.0f; m_bTacticsStartOnSense = FALSE ; m_colBurning = COLOR(C_WHITE | CT_OPAQUE ); m_bResizeAttachments = FALSE ; m_penPrediction = NULL; CMovableModelEntity::SetDefaultProperties(); } CEnemyBase::CEnemyBase(void) #line 213 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 214 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmPredict = 0; #line 215 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 218 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::SetPredictionTime(TIME tmAdvance) #line 219 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 220 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (! IsPredictor ()); #line 221 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmPredict = _pTimer -> CurrentTick () + tmAdvance ; #line 222 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 225 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" TIME CEnemyBase::GetPredictionTime(void) #line 226 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 227 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return m_tmPredict ; #line 228 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } CTString CEnemyBase::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath) #line 232 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 233 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CTString str ; #line 234 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" str . PrintF (TRANS ("%s killed %s") , GetClass () -> ec_pdecDLLClass -> dec_strName , strPlayerName ); #line 235 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return str ; #line 236 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } FLOAT CEnemyBase::GetCrushHealth(void) #line 239 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 240 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return 0.0f; #line 241 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } BOOL CEnemyBase::CountAsKill(void) #line 245 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 246 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 247 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } BOOL CEnemyBase::ForcesCannonballToExplode(void) #line 250 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 251 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 252 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } FLOAT & CEnemyBase::GetProp(FLOAT & m_fBase) #line 256 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 257 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return m_fBase ; #line 258 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } FLOAT CEnemyBase::GetThreatDistance(void) #line 262 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 264 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return Max (GetProp (m_fCloseDistance ) , GetProp (m_fStopDistance )); #line 265 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 268 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::MaybeSwitchToAnotherPlayer(void) #line 269 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 271 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(GetSP () -> sp_bSinglePlayer ){ #line 273 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 274 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 277 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(CalcDist (m_penEnemy ) < GetThreatDistance ()){ #line 279 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 280 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 282 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penNewEnemy = GetWatcher () -> CheckAnotherPlayer (m_penEnemy ); #line 283 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penNewEnemy != m_penEnemy && penNewEnemy != NULL ){ #line 284 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penEnemy = penNewEnemy ; #line 285 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEvent (EReconsiderBehavior ()); #line 286 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 287 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 289 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" class CWatcher * CEnemyBase::GetWatcher(void) #line 290 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 291 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_penWatcher != NULL ); #line 292 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return (CWatcher *) & * m_penWatcher ; #line 293 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::Copy(CEntity & enOther,ULONG ulFlags) #line 295 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 296 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CMovableModelEntity :: Copy (enOther , ulFlags ); #line 297 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEnemyBase * penOther = (CEnemyBase *) (& enOther ); #line 298 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 300 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::Precache(void) #line 301 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 302 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheModel (MODEL_FLESH ); #line 303 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheModel (MODEL_FLESH_APPLE ); #line 304 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheModel (MODEL_FLESH_BANANA ); #line 305 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheModel (MODEL_FLESH_BURGER ); #line 306 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheModel (MODEL_MACHINE ); #line 307 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_MACHINE ); #line 308 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_FLESH_RED ); #line 309 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_FLESH_GREEN ); #line 310 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_FLESH_APPLE ); #line 311 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_FLESH_BANANA ); #line 312 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_FLESH_BURGER ); #line 313 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_FLESH_LOLLY ); #line 314 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheTexture (TEXTURE_FLESH_ORANGE ); #line 315 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheClass (CLASS_BASIC_EFFECT , BET_BLOODSPILL ); #line 316 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheClass (CLASS_BASIC_EFFECT , BET_BLOODSTAIN ); #line 317 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheClass (CLASS_BASIC_EFFECT , BET_BLOODSTAINGROW ); #line 318 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheClass (CLASS_BASIC_EFFECT , BET_BLOODEXPLODE ); #line 319 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheClass (CLASS_BASIC_EFFECT , BET_BOMB ); #line 320 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheClass (CLASS_BASIC_EFFECT , BET_EXPLOSIONSTAIN ); #line 321 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PrecacheClass (CLASS_DEBRIS ); #line 322 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } FLOAT3D CEnemyBase::PlayerDestinationPos(void) #line 326 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 327 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return m_penEnemy -> GetPlacement () . pl_PositionVector ; #line 328 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 331 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D CEnemyBase::CalcDelta(CEntity * penEntity) #line 332 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 333 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (penEntity != NULL ); #line 335 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return penEntity -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ; #line 336 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 338 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::CalcDist(CEntity * penEntity) #line 339 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 340 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return CalcDelta (penEntity ) . Length (); #line 341 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 343 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::IfTargetCrushed(CEntity * penOther,const FLOAT3D & vDirection) #line 344 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 345 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsOfClass (penOther , "ModelHolder2")) #line 346 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 347 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fCrushHealth = GetCrushHealth (); #line 348 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fCrushHealth > ((CRationalEntity &) * penOther ) . GetHealth ()) #line 349 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 350 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" InflictDirectDamage (penOther , this , #line 351 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" DMT_EXPLOSION , fCrushHealth , GetPlacement () . pl_PositionVector , vDirection ); #line 352 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 353 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 354 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 355 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 356 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 359 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D CEnemyBase::CalcPlaneDelta(CEntity * penEntity) #line 360 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 361 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (penEntity != NULL ); #line 362 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPlaneDelta ; #line 364 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetNormalComponent ( #line 365 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penEntity -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector , #line 366 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" en_vGravityDir , vPlaneDelta ); #line 367 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return vPlaneDelta ; #line 368 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 371 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::CalcPlaneDist(CEntity * penEntity) #line 372 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 373 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return CalcPlaneDelta (penEntity ) . Length (); #line 374 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 377 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::GetFrustumAngle(const FLOAT3D & vDir) #line 378 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 380 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vFront = - GetRotationMatrix () . GetColumn (3); #line 382 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return (vDir / vDir . Length ()) % vFront ; #line 383 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 386 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::GetPlaneFrustumAngle(const FLOAT3D & vDir) #line 387 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 388 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPlaneDelta ; #line 390 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetNormalComponent (vDir , en_vGravityDir , vPlaneDelta ); #line 392 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vFront = - GetRotationMatrix () . GetColumn (3); #line 393 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPlaneFront ; #line 394 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetNormalComponent (vFront , en_vGravityDir , vPlaneFront ); #line 396 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vPlaneDelta . SafeNormalize (); #line 397 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vPlaneFront . SafeNormalize (); #line 398 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return vPlaneDelta % vPlaneFront ; #line 399 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 402 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::IsInFrustum(CEntity * penEntity,FLOAT fCosHalfFrustum) #line 403 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 405 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDelta = CalcDelta (penEntity ); #line 407 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vFront = - GetRotationMatrix () . GetColumn (3); #line 409 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fDotProduct = (vDelta / vDelta . Length ()) % vFront ; #line 410 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return fDotProduct >= fCosHalfFrustum ; #line 411 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 414 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::IsInPlaneFrustum(CEntity * penEntity,FLOAT fCosHalfFrustum) #line 415 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 417 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPlaneDelta = CalcPlaneDelta (penEntity ); #line 419 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vFront = - GetRotationMatrix () . GetColumn (3); #line 420 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPlaneFront ; #line 421 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetNormalComponent (vFront , en_vGravityDir , vPlaneFront ); #line 423 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vPlaneDelta . SafeNormalize (); #line 424 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vPlaneFront . SafeNormalize (); #line 425 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fDot = vPlaneDelta % vPlaneFront ; #line 426 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return fDot >= fCosHalfFrustum ; #line 427 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 430 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::IsVisible(CEntity * penEntity) #line 431 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 432 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (penEntity != NULL ); #line 434 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vSource , vTarget ; #line 435 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetPositionCastRay (this , penEntity , vSource , vTarget ); #line 438 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CCastRay crRay (this , vSource , vTarget ); #line 439 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" crRay . cr_ttHitModels = CCastRay :: TT_NONE ; #line 440 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" crRay . cr_bHitTranslucentPortals = FALSE ; #line 441 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" en_pwoWorld -> CastRay (crRay ); #line 444 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return (crRay . cr_penHit == NULL ); #line 445 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 448 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::IsVisibleCheckAll(CEntity * penEntity) #line 449 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 450 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (penEntity != NULL ); #line 452 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vSource , vTarget ; #line 453 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetPositionCastRay (this , penEntity , vSource , vTarget ); #line 456 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CCastRay crRay (this , vSource , vTarget ); #line 457 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" crRay . cr_ttHitModels = CCastRay :: TT_COLLISIONBOX ; #line 458 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" crRay . cr_bHitTranslucentPortals = FALSE ; #line 459 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" en_pwoWorld -> CastRay (crRay ); #line 462 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return crRay . cr_penHit == penEntity ; #line 463 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 466 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::CalculateAngularLaunchParams( #line 467 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vShooting,FLOAT fShootHeight, #line 468 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vTarget,FLOAT3D vSpeedDest, #line 469 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ANGLE aPitch, #line 470 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT & fLaunchSpeed, #line 471 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT & fRelativeHdg) #line 472 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 473 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vNewTarget = vTarget ; #line 474 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D & vGravity = en_vGravityDir ; #line 475 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fYt ; #line 476 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fXt ; #line 477 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fA = TanFast (AngleDeg (aPitch )); #line 478 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fTime = 0.0f; #line 479 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fLastTime = 0.0f; #line 481 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" INDEX iIterations = 0; #line 482 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" do #line 483 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 484 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" iIterations ++; #line 485 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDistance = vNewTarget - vShooting ; #line 486 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vXt , vYt ; #line 487 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetParallelAndNormalComponents (vDistance , vGravity , vYt , vXt ); #line 488 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fYt = vYt . Length (); #line 489 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(vGravity % vYt > 0){ #line 490 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fYt = - fYt ; #line 491 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 492 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fXt = vXt . Length (); #line 493 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fLastTime = fTime ; #line 494 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fTime = Sqrt (2.0f) * Sqrt ((fA * fXt + fShootHeight - fYt ) / en_fGravityA ); #line 495 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vNewTarget = vTarget + vSpeedDest * fTime ; #line 496 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 497 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" while((Abs (fTime - fLastTime ) > _pTimer -> TickQuantum ) && (iIterations < 10)); #line 500 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fLaunchSpeed = fXt / (fTime * Cos (aPitch )); #line 503 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fHdgTargetNow = GetRelativeHeading ((vTarget - vShooting ) . SafeNormalize ()); #line 504 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fHdgTargetMoved = GetRelativeHeading ((vNewTarget - vShooting ) . SafeNormalize ()); #line 505 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fRelativeHdg = fHdgTargetMoved - fHdgTargetNow ; #line 506 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 509 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D CEnemyBase::CalculatePredictedPosition(FLOAT3D vShootPos,FLOAT3D vTarget, #line 510 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fSpeedSrc,FLOAT3D vSpeedDst,FLOAT fClampY) #line 511 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 512 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vNewTarget = vTarget ; #line 513 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D & vGravity = en_vGravityDir ; #line 514 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fTime = 0.0f; #line 515 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fLastTime = 0.0f; #line 516 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" INDEX iIterations = 0; #line 517 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDistance = vNewTarget - vShootPos ; #line 520 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" do #line 521 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 522 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" iIterations ++; #line 523 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fLastTime = fTime ; #line 524 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fTime = vDistance . Length () / fSpeedSrc ; #line 525 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vNewTarget = vTarget + vSpeedDst * fTime + vGravity * 0.5f * fTime * fTime ; #line 526 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vNewTarget (2) = ClampDn (vNewTarget (2) , fClampY ); #line 527 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDistance = vNewTarget - vShootPos ; #line 528 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 529 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" while((Abs (fTime - fLastTime ) > _pTimer -> TickQuantum ) && (iIterations < 10)); #line 530 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return vNewTarget ; #line 531 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 534 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::MovesByTargetedRoute(CTString & strTargetProperty)const { #line 535 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" strTargetProperty = "Marker"; #line 536 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 537 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 539 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::DropsMarker(CTFileName & fnmMarkerClass,CTString & strTargetProperty)const { #line 540 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fnmMarkerClass = CTFILENAME ("Classes\\EnemyMarker.ecl"); #line 541 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" strTargetProperty = "Marker"; #line 542 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 543 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 544 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" const CTString & CEnemyBase::GetDescription(void)const { #line 545 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CTString &) m_strDescription ) . PrintF ("->"); #line 546 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penMarker != NULL ){ #line 547 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CTString &) m_strDescription ) . PrintF ("->%s" , m_penMarker -> GetName ()); #line 548 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 549 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return m_strDescription ; #line 550 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } const CTFileName & CEnemyBase::GetComputerMessageName(void)const { #line 553 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" static CTFileName fnm (CTString ("")); #line 554 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return fnm ; #line 555 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 558 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::AddDependentsToPrediction(void) #line 559 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 560 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penSpray -> AddToPrediction (); #line 561 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penWatcher != NULL ){ #line 562 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> AddToPrediction (); #line 563 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 564 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 567 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::ChecksumForSync(ULONG & ulCRC,INDEX iExtensiveSyncCheck) { #line 568 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CMovableModelEntity :: ChecksumForSync (ulCRC , iExtensiveSyncCheck ); #line 569 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 571 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::DumpSync_t(CTStream & strm,INDEX iExtensiveSyncCheck) #line 572 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 573 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CMovableModelEntity :: DumpSync_t (strm , iExtensiveSyncCheck ); #line 574 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" strm . FPrintF_t ("enemy: "); #line 575 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy != NULL ){ #line 576 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" strm . FPrintF_t ("id: %08X\n" , m_penEnemy -> en_ulID ); #line 577 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 578 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" strm . FPrintF_t ("none\n"); #line 579 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 588 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 591 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::Read_t(CTStream * istr) { #line 592 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CMovableModelEntity :: Read_t (istr ); #line 595 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penMainMusicHolder != NULL ){ #line 596 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CMusicHolder &) * m_penMainMusicHolder ) . m_cenFussMakers . Add (this ); #line 597 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 598 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 601 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::FillEntityStatistics(EntityStats * pes) #line 602 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 603 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" pes -> es_strName = GetClass () -> ec_pdecDLLClass -> dec_strName ; #line 604 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bTemplate ){ #line 605 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" pes -> es_ctCount = 0; #line 606 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 607 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" pes -> es_ctCount = 1; #line 608 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 609 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" pes -> es_ctAmmount = 1; #line 610 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" pes -> es_fValue = GetHealth (); #line 611 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" pes -> es_iScore = m_iScore ; #line 612 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 613 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 616 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType, #line 617 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection) #line 618 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 620 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bTemplate ){ #line 622 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 623 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 625 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fNewDamage = fDamageAmmount ; #line 628 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fNewDamage *= DamageStrength (((EntityInfo *) GetEntityInfo ()) -> Eeibt , dmtType ); #line 630 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fNewDamage *= GetGameDamageMultiplier (); #line 633 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fNewDamage == 0){ #line 635 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 636 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 637 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fKickDamage = fNewDamage ; #line 638 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if((dmtType == DMT_EXPLOSION ) || (dmtType == DMT_IMPACT ) || (dmtType == DMT_CANNONBALL_EXPLOSION )) #line 639 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 640 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fKickDamage *= 1.5; #line 641 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 642 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(dmtType == DMT_DROWNING || dmtType == DMT_CLOSERANGE || dmtType == DMT_CHAINSAW ){ #line 643 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fKickDamage /= 10; #line 644 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 645 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(dmtType == DMT_BURNING ) #line 646 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 647 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fKickDamage /= 100000; #line 648 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UBYTE ubR , ubG , ubB , ubA ; #line 649 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fColorFactor = fNewDamage / m_fMaxHealth * 255.0f; #line 650 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ColorToRGBA (m_colBurning , ubR , ubG , ubB , ubA ); #line 651 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ubR = ClampDn (ubR - fColorFactor , 32.0f); #line 652 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_colBurning = RGBAToColor (ubR , ubR , ubR , ubA ); #line 653 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 656 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" TIME tmNow = _pTimer -> CurrentTick (); #line 657 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" TIME tmDelta = tmNow - m_tmLastDamage ; #line 658 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmLastDamage = tmNow ; #line 661 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(tmDelta >= _pTimer -> TickQuantum * 3){ #line 662 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDamage = FLOAT3D (0 , 0 , 0); #line 663 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 665 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDirectionFixed ; #line 666 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(vDirection . ManhattanNorm () > 0.5f){ #line 667 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDirectionFixed = vDirection ; #line 668 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 669 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDirectionFixed = - en_vGravityDir ; #line 670 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 671 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDamageOld = m_vDamage ; #line 677 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 678 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDamage += (vDirectionFixed - en_vGravityDir / 2) * fKickDamage ; #line 679 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 681 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fOldLen = vDamageOld . Length (); #line 682 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fNewLen = m_vDamage . Length (); #line 683 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fOldRootLen = Sqrt (fOldLen ); #line 684 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fNewRootLen = Sqrt (fNewLen ); #line 686 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fMassFactor = 300.0f / ((EntityInfo *) GetEntityInfo ()) -> fMass ; #line 688 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(! (en_ulFlags & ENF_ALIVE )) #line 689 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 690 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fMassFactor /= 3; #line 691 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 693 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fOldLen != 0.0f) #line 694 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 696 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GiveImpulseTranslationAbsolute (- vDamageOld / fOldRootLen * fMassFactor ); #line 697 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 702 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GiveImpulseTranslationAbsolute (m_vDamage / fNewRootLen * fMassFactor ); #line 708 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fMaxDamageAmmount < fDamageAmmount ) #line 709 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 710 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMaxDamageAmmount = fDamageAmmount ; #line 711 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 713 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if((m_tmSpraySpawned <= _pTimer -> CurrentTick () - _pTimer -> TickQuantum * 8 || #line 714 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fSprayDamage + fNewDamage > 50.0f) #line 715 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" && m_fSpiritStartTime == 0 && #line 716 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" dmtType != DMT_CHAINSAW && #line 717 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ! (dmtType == DMT_BURNING && GetHealth () < 0)){ #line 720 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPlacement3D plSpray = CPlacement3D (vHitPoint , ANGLE3D (0 , 0 , 0)); #line 721 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penSpray = CreateEntity (plSpray , CLASS_BLOOD_SPRAY ); #line 722 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_sptType != SPT_ELECTRICITY_SPARKS ) #line 723 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 724 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penSpray -> SetParent (this ); #line 725 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 727 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ESpawnSpray eSpawnSpray ; #line 728 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . colBurnColor = C_WHITE | CT_OPAQUE ; #line 730 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fMaxDamageAmmount > 10.0f) #line 731 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 732 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . fDamagePower = 3.0f; #line 733 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 734 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" else if(m_fSprayDamage + fNewDamage > 50.0f) #line 735 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 736 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . fDamagePower = 2.0f; #line 737 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 738 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" else #line 739 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 740 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . fDamagePower = 1.0f; #line 741 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 743 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . sptType = m_sptType ; #line 744 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . fSizeMultiplier = 1.0f; #line 747 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vHitPointRelative = vHitPoint - GetPlacement () . pl_PositionVector ; #line 748 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vReflectingNormal ; #line 749 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetNormalComponent (vHitPointRelative , en_vGravityDir , vReflectingNormal ); #line 750 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vReflectingNormal . SafeNormalize (); #line 752 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vReflectingNormal (1) /= 5.0f; #line 754 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vProjectedComponent = vReflectingNormal * (vDirection % vReflectingNormal ); #line 755 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vSpilDirection = vDirection - vProjectedComponent * 2.0f - en_vGravityDir * 0.5f; #line 757 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . vDirection = vSpilDirection ; #line 758 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnSpray . penOwner = this ; #line 766 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penSpray -> Initialize (eSpawnSpray ); #line 767 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmSpraySpawned = _pTimer -> CurrentTick (); #line 768 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fSprayDamage = 0.0f; #line 769 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMaxDamageAmmount = 0.0f; #line 770 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 771 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fSprayDamage += fNewDamage ; #line 773 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CMovableModelEntity :: ReceiveDamage (penInflictor , #line 774 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" dmtType , fNewDamage , vHitPoint , vDirection ); #line 775 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 782 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::AdjustShadingParameters(FLOAT3D & vLightDirection,COLOR & colLight,COLOR & colAmbient) #line 783 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 784 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" colAmbient = AddColors (colAmbient , m_colColor ); #line 785 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bFadeOut ){ #line 786 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fTimeRemain = m_fFadeStartTime + m_fFadeTime - _pTimer -> CurrentTick (); #line 787 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fTimeRemain < 0.0f){fTimeRemain = 0.0f;} #line 788 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" COLOR colAlpha ; #line 789 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL || en_RenderType == RT_SKAEDITORMODEL ){ #line 790 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" colAlpha = GetModelInstance () -> GetModelColor (); #line 791 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" colAlpha = (colAlpha & 0xFFFFFF00) + (COLOR (fTimeRemain / m_fFadeTime * 0xFF) & 0xFF); #line 792 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelInstance () -> SetModelColor (colAlpha ); #line 793 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 794 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" else { #line 795 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" colAlpha = GetModelObject () -> mo_colBlendColor ; #line 796 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" colAlpha = (colAlpha & 0xFFFFFF00) + (COLOR (fTimeRemain / m_fFadeTime * 0xFF) & 0xFF); #line 797 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelObject () -> mo_colBlendColor = colAlpha ; #line 798 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 800 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 801 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(GetSP () -> sp_bMental ){ #line 802 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(GetHealth () <= 0){ #line 803 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL || en_RenderType == RT_SKAEDITORMODEL ){ #line 804 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelInstance () -> SetModelColor (C_WHITE & 0xFF); #line 805 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 806 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelObject () -> mo_colBlendColor = C_WHITE & 0xFF; #line 807 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 808 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 809 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" extern FLOAT ent_tmMentalIn ; #line 810 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" extern FLOAT ent_tmMentalOut ; #line 811 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" extern FLOAT ent_tmMentalFade ; #line 812 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT tmIn = ent_tmMentalIn ; #line 813 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT tmOut = ent_tmMentalOut ; #line 814 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT tmFade = ent_tmMentalFade ; #line 815 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT tmExist = tmFade + tmIn + tmFade ; #line 816 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT tmTotal = tmFade + tmIn + tmFade + tmOut ; #line 818 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT tmTime = _pTimer -> GetLerpedCurrentTick (); #line 819 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fFactor = 1; #line 820 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(tmTime > 0.1f){ #line 821 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" tmTime += en_ulID * 123.456f; #line 822 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" tmTime = fmod (tmTime , tmTotal ); #line 823 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fFactor = CalculateRatio (tmTime , 0 , tmExist , tmFade / tmExist , tmFade / tmExist ); #line 824 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 826 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL || en_RenderType == RT_SKAEDITORMODEL ){ #line 827 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelInstance () -> SetModelColor (C_WHITE | INDEX (0xFF * fFactor )); #line 828 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 829 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelObject () -> mo_colBlendColor = C_WHITE | INDEX (0xFF * fFactor ); #line 830 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 831 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 832 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 833 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 834 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_colBurning != COLOR (C_WHITE | CT_OPAQUE )) #line 835 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 836 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" colAmbient = MulColors (colAmbient , m_colBurning ); #line 837 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" colLight = MulColors (colLight , m_colBurning ); #line 838 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 839 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return CMovableModelEntity :: AdjustShadingParameters (vLightDirection , colLight , colAmbient ); #line 840 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 844 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::AddToFuss(void) #line 845 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 846 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsPredictor ()){ #line 848 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmLastFussTime = _pTimer -> CurrentTick (); #line 849 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 850 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 853 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penMainMusicHolder == NULL ){ #line 855 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penMainMusicHolder = _pNetwork -> GetEntityWithName ("MusicHolder" , 0); #line 857 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penMainMusicHolder == NULL ){ #line 859 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmLastFussTime = _pTimer -> CurrentTick (); #line 861 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 862 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 864 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CMusicHolder &) * m_penMainMusicHolder ) . m_cenFussMakers . Add (this ); #line 866 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bBoss ){ #line 867 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CMusicHolder &) * m_penMainMusicHolder ) . m_penBoss = this ; #line 868 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 870 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmLastFussTime = _pTimer -> CurrentTick (); #line 873 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 875 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (((CMusicHolder &) * m_penMainMusicHolder ) . m_cenFussMakers . IsMember (this )); #line 877 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bBoss ){ #line 878 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CMusicHolder &) * m_penMainMusicHolder ) . m_penBoss = this ; #line 879 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 881 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmLastFussTime = _pTimer -> CurrentTick (); #line 882 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 883 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 884 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::RemoveFromFuss(void) #line 885 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 886 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsPredictor ()){ #line 887 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 888 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 890 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penMainMusicHolder == NULL ){ #line 892 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 893 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 895 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CMusicHolder &) * m_penMainMusicHolder ) . m_cenFussMakers . Remove (this ); #line 897 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bBoss ){ #line 898 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(((CMusicHolder &) * m_penMainMusicHolder ) . m_penBoss != this ){ #line 899 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPrintF (TRANS ("More than one boss active!\n")); #line 900 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ((CMusicHolder &) * m_penMainMusicHolder ) . m_penBoss = NULL ; #line 901 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 902 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 903 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penMainMusicHolder = NULL ; #line 904 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 907 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::ShouldCeaseAttack(void) #line 908 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 910 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy == NULL || #line 911 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ! (m_penEnemy -> GetFlags () & ENF_ALIVE ) || #line 912 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" (m_penEnemy -> GetFlags () & ENF_DELETED )){ #line 914 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 915 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 917 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(_pTimer -> CurrentTick () > m_tmLastFussTime + m_tmGiveUp ){ #line 919 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 920 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 922 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 923 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::SizeModel(void) #line 927 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 928 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vStretch = GetModelStretch (); #line 931 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vStretch *= m_fStretchMultiplier ; #line 934 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bApplyRandomStretch ) #line 935 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 937 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bApplyRandomStretch = FALSE ; #line 939 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fRandomStretchMultiplier = (FRnd () - 0.5f) * m_fRandomStretchFactor + 1.0f; #line 940 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 943 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vStretch *= m_fRandomStretchMultiplier ; #line 945 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bResizeAttachments ){ #line 946 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StretchModel (vStretch ); #line 947 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(TRUE ){ #line 948 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StretchSingleModel (vStretch ); #line 949 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 950 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ModelChangeNotify (); #line 951 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 954 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::IsValidForEnemy(CEntity * penPlayer) #line 955 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 956 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return #line 957 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penPlayer != NULL && #line 958 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" IsDerivedFromClass (penPlayer , "Player") && #line 959 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penPlayer -> GetFlags () & ENF_ALIVE ; #line 960 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 963 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::SetTargetNone(void) #line 964 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 965 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_ttTarget = TT_NONE ; #line 966 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 967 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penEnemy = NULL ; #line 968 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 971 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::SetTargetSoft(CEntity * penPlayer) #line 972 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 974 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(! IsValidForEnemy (penPlayer )){ #line 976 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 977 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 979 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_ttTarget != TT_NONE ){ #line 981 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 982 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 984 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penOld = m_penEnemy ; #line 985 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_ttTarget = TT_SOFT ; #line 986 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 987 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penEnemy = penPlayer ; #line 988 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return penOld != penPlayer ; #line 989 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 992 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::SetTargetHard(CEntity * penPlayer) #line 993 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 995 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(! IsValidForEnemy (penPlayer )){ #line 997 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 998 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1000 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_ttTarget == TT_HARD ){ #line 1002 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1003 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1005 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penOld = m_penEnemy ; #line 1006 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_ttTarget = TT_HARD ; #line 1007 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 1008 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penEnemy = penPlayer ; #line 1009 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return penOld != penPlayer ; #line 1010 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1013 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::SetTargetHardForce(CEntity * penPlayer) #line 1014 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1016 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(! IsValidForEnemy (penPlayer )){ #line 1018 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1019 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1021 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penOld = m_penEnemy ; #line 1022 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_ttTarget = TT_HARD ; #line 1023 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 1024 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penEnemy = penPlayer ; #line 1025 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return penOld != penPlayer ; #line 1026 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } FLOAT CEnemyBase::GetAttackMoveFrequency(FLOAT fEnemyDistance) #line 1034 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1035 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fEnemyDistance > GetProp (m_fCloseDistance )){ #line 1036 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return 0.5f; #line 1037 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1038 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return 0.25f; #line 1039 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1040 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::SetSpeedsToDesiredPosition(const FLOAT3D & vPosDelta,FLOAT fPosDist,BOOL bGoingToPlayer) #line 1044 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1045 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fEnemyDistance = CalcDist (m_penEnemy ); #line 1046 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fCloseDistance = GetProp (m_fCloseDistance ); #line 1047 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fStopDistance = GetProp (m_fStopDistance ); #line 1049 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fCos = GetPlaneFrustumAngle (vPosDelta ); #line 1051 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(MayMoveToAttack () && #line 1053 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fCos > CosFast (45.0f) && #line 1055 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fEnemyDistance > fStopDistance ){ #line 1057 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fEnemyDistance < fCloseDistance ){ #line 1058 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fCloseRunSpeed ); #line 1059 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aCloseRotateSpeed ); #line 1060 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1061 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fAttackRunSpeed ); #line 1062 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aAttackRotateSpeed ); #line 1063 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1066 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_bTacticActive ){ #line 1068 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fEnemyDistance < fCloseDistance ){ #line 1069 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fCloseRunSpeed ); #line 1070 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aCloseRotateSpeed ); #line 1071 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1072 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fAttackRunSpeed ); #line 1073 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aAttackRotateSpeed ); #line 1074 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1077 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(fCos < CosFast (15.0f)){ #line 1079 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = 0; #line 1080 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fEnemyDistance < fCloseDistance ){ #line 1081 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aCloseRotateSpeed ); #line 1082 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1083 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aAttackRotateSpeed ); #line 1084 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1087 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1089 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(bGoingToPlayer || ! WouldNotLeaveAttackRadius ()){ #line 1091 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = 0; #line 1092 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = 0; #line 1094 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1095 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fCloseRunSpeed ); #line 1096 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aCloseRotateSpeed ); #line 1097 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1098 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1099 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::MovementAnimation(ULONG ulFlags) #line 1103 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1104 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(ulFlags & MF_MOVEZ ){ #line 1105 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fMoveSpeed == GetProp (m_fAttackRunSpeed ) || m_fMoveSpeed == GetProp (m_fCloseRunSpeed ) #line 1106 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" || m_fMoveSpeed > GetProp (m_fWalkSpeed )){ #line 1107 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" RunningAnim (); #line 1108 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1109 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" WalkingAnim (); #line 1110 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1111 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(ulFlags & MF_ROTATEH ){ #line 1112 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" RotatingAnim (); #line 1113 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1114 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy != NULL ){ #line 1115 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnimFight (); #line 1116 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1117 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnim (); #line 1118 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1119 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1120 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } ULONG CEnemyBase::SetDesiredMovement(void) #line 1125 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1126 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ULONG ulFlags = 0; #line 1129 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDelta = m_vDesiredPosition - GetPlacement () . pl_PositionVector ; #line 1131 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PLAYERCURRENT ){ #line 1132 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ApplyTactics (vDelta ); #line 1133 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1136 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_aRotateSpeed > 0.0f){ #line 1138 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDir = vDelta ; #line 1139 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDir . SafeNormalize (); #line 1140 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ANGLE aWantedHeadingRelative = GetRelativeHeading (vDir ); #line 1143 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" aWantedHeadingRelative = NormalizeAngle (aWantedHeadingRelative ); #line 1145 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ANGLE aHeadingRotation ; #line 1147 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(aWantedHeadingRelative < - m_aRotateSpeed * m_fMoveFrequency ){ #line 1149 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" aHeadingRotation = - m_aRotateSpeed ; #line 1151 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(aWantedHeadingRelative > m_aRotateSpeed * m_fMoveFrequency ){ #line 1153 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" aHeadingRotation = + m_aRotateSpeed ; #line 1155 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1157 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" aHeadingRotation = aWantedHeadingRelative / m_fMoveFrequency ; #line 1158 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1160 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetDesiredRotation (ANGLE3D (aHeadingRotation , 0 , 0)); #line 1162 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(Abs (aHeadingRotation ) > 1.0f){ #line 1163 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ulFlags |= MF_ROTATEH ; #line 1164 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1167 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1169 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetDesiredRotation (ANGLE3D (0 , 0 , 0)); #line 1170 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1173 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fMoveSpeed > 0.0f){ #line 1175 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vTranslation (0.0f , 0.0f , 0.0f); #line 1176 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vTranslation (3) = - m_fMoveSpeed ; #line 1179 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetDesiredTranslation (vTranslation ); #line 1181 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ulFlags |= MF_MOVEZ ; #line 1184 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1186 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetDesiredTranslation (FLOAT3D (0 , 0 , 0)); #line 1187 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1189 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ulFlags ; #line 1190 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1193 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::StopMoving() #line 1194 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1195 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopRotating (); #line 1196 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopTranslating (); #line 1197 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1200 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::StopRotating() #line 1201 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1202 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetDesiredRotation (ANGLE3D (0 , 0 , 0)); #line 1203 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1206 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::StopTranslating() #line 1207 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1208 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f)); #line 1209 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1212 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::CalcDistanceInPlaneToDestination(void) #line 1213 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1215 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vNormal ; #line 1216 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetNormalComponent (m_vDesiredPosition - GetPlacement () . pl_PositionVector , en_vGravityDir , vNormal ); #line 1217 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return vNormal . Length (); #line 1218 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::StartPathFinding(void) #line 1222 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1223 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_dtDestination == DT_PATHPERSISTENT || m_dtDestination == DT_PATHTEMPORARY ); #line 1225 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penMarker ; #line 1226 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPath ; #line 1228 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PATH_FindFirstMarker (this , #line 1229 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetPlacement () . pl_PositionVector , m_penEnemy -> GetPlacement () . pl_PositionVector , #line 1230 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penMarker , vPath ); #line 1232 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penMarker == NULL || ! IsVisible (penMarker )){ #line 1234 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERSPOTTED ; #line 1236 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vPlayerSpotted = PlayerDestinationPos (); #line 1237 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1238 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1240 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = vPath , #line 1241 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penPathMarker = penMarker ; #line 1242 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::FindNextPathMarker(void) #line 1246 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1248 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penPathMarker == NULL ){ #line 1250 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (FALSE ); #line 1252 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 1253 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1254 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1257 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penMarker = m_penPathMarker ; #line 1258 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPath ; #line 1259 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PATH_FindNextMarker (this , #line 1260 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetPlacement () . pl_PositionVector , m_penEnemy -> GetPlacement () . pl_PositionVector , #line 1261 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penMarker , vPath ); #line 1264 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penMarker == NULL || ! IsVisible (penMarker )){ #line 1266 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERSPOTTED ; #line 1268 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vPlayerSpotted = PlayerDestinationPos (); #line 1269 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1270 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1273 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = vPath , #line 1274 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penPathMarker = penMarker ; #line 1275 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1278 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::CheckTouchForPathFinding(const ETouch & eTouch) #line 1279 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1281 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy == NULL ){ #line 1283 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1284 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1287 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PATHPERSISTENT || m_dtDestination == DT_PATHTEMPORARY ){ #line 1289 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1290 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1292 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDir = en_vDesiredTranslationRelative ; #line 1293 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDir . SafeNormalize (); #line 1294 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDir *= GetRotationMatrix (); #line 1296 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if((eTouch . plCollision % vDir ) < - 0.5f){ #line 1297 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy != NULL && IsVisible (m_penEnemy )){ #line 1298 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PATHPERSISTENT ; #line 1299 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1300 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PATHTEMPORARY ; #line 1301 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1302 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StartPathFinding (); #line 1303 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return m_penPathMarker != NULL ; #line 1304 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1305 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1306 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1307 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1310 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::CheckFallForPathFinding(const EWouldFall & eWouldFall) #line 1311 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1313 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy == NULL ){ #line 1315 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1316 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1319 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PATHPERSISTENT || m_dtDestination == DT_PATHTEMPORARY ){ #line 1321 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1322 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1324 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy != NULL && IsVisible (m_penEnemy )){ #line 1325 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PATHPERSISTENT ; #line 1326 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1327 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PATHTEMPORARY ; #line 1328 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1329 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StartPathFinding (); #line 1331 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return m_penPathMarker != NULL ; #line 1332 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1338 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::InitializeTactics(void) { #line 1342 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penTacticsHolder == NULL || ! IsOfClass (m_penTacticsHolder , "TacticsHolder") #line 1343 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" || m_penEnemy == NULL ){ #line 1344 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1345 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1347 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CTacticsHolder * penTactics = & (CTacticsHolder &) * m_penTacticsHolder ; #line 1350 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmTacticsActivation = _pTimer -> CurrentTick (); #line 1351 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vTacticsStartPosition = GetPlacement () . pl_PositionVector ; #line 1354 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fSign ; #line 1356 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(Sgn (penTactics -> m_fParam2 ) > 0 && Sgn (penTactics -> m_fParam1 ) > 0){ #line 1357 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fSign = + 1.0f; #line 1358 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(Sgn (penTactics -> m_fParam2 ) < 0 && Sgn (penTactics -> m_fParam1 ) < 0){ #line 1359 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fSign = - 1.0f; #line 1360 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1361 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fSign = Sgn (FRnd () - 0.5f); #line 1362 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1364 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" switch(penTactics -> m_tctType ){ #line 1365 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case TCT_DAMP_ANGLE_STRIFE : { #line 1367 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar1 = Lerp (Abs (penTactics -> m_fParam1 ) , Abs (penTactics -> m_fParam2 ) , FRnd ()) * fSign ; #line 1369 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar2 = penTactics -> m_fParam4 ; #line 1371 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar3 = penTactics -> m_fParam3 ; #line 1373 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar4 = (m_penEnemy -> GetPlacement () . pl_PositionVector - m_vTacticsStartPosition ) . Length (); #line 1375 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar5 = penTactics -> m_fParam5 ; #line 1376 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" break ;} #line 1378 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case TCT_PARALLEL_RANDOM_DISTANCE : #line 1380 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar1 = Lerp (penTactics -> m_fParam4 , penTactics -> m_fParam5 , FRnd ()); #line 1382 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar4 = Lerp (Abs (penTactics -> m_fParam1 ) , Abs (penTactics -> m_fParam2 ) , FRnd ()) * fSign ; #line 1384 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar2 = m_fAttackRunSpeed * 2.0f * 90.0f / m_aAttackRotateSpeed ; #line 1387 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar3 = penTactics -> m_fParam3 ; #line 1389 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar5 = (GetPlacement () . pl_PositionVector - m_penEnemy -> GetPlacement () . pl_PositionVector ) . Length (); #line 1391 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar2 = ClampDn (m_fTacticVar2 , 2.0f); #line 1393 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" break ; #line 1395 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case TCT_STATIC_RANDOM_V_DISTANCE : #line 1397 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar1 = Lerp (Abs (penTactics -> m_fParam1 ) , Abs (penTactics -> m_fParam2 ) , FRnd ()) * fSign ; #line 1399 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar2 = Lerp (penTactics -> m_fParam3 , penTactics -> m_fParam4 , FRnd ()); #line 1400 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" break ; #line 1401 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1402 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::ApplyTactics(FLOAT3D & vDesiredPos) { #line 1408 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penTacticsHolder == NULL || ! IsOfClass (m_penTacticsHolder , "TacticsHolder") #line 1409 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" || m_penEnemy == NULL ){ #line 1410 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1411 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1413 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CTacticsHolder * penTactics = & (CTacticsHolder &) * m_penTacticsHolder ; #line 1417 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penTactics -> m_tmLastActivation == - 1 || penTactics -> m_tctType == TCT_NONE ){ #line 1418 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bTacticActive = FALSE ; #line 1419 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_tmTacticsActivation < penTactics -> m_tmLastActivation ){ #line 1420 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" InitializeTactics (); #line 1421 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bTacticActive = TRUE ; #line 1422 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1424 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bTacticActive ){ #line 1427 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vEnemyDistance = m_vTacticsStartPosition - m_penEnemy -> GetPlacement () . pl_PositionVector ; #line 1428 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fEnemyDistance = vEnemyDistance . Length (); #line 1429 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vEnemyDistance . SafeNormalize (); #line 1430 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ANGLE3D angEnemy = ANGLE3D (0.0f , 0.0f , 0.0f); #line 1433 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fDistanceRatio = 0.0f; #line 1434 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fTimeRatio = 0.0f; #line 1436 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" switch(penTactics -> m_tctType ) #line 1437 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1438 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case TCT_DAMP_ANGLE_STRIFE : { #line 1440 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(CalcDist (m_penEnemy ) < m_fTacticVar5 ){ #line 1441 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bTacticActive = FALSE ; #line 1442 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1444 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fDistanceRatio = 1.0f; #line 1445 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fTacticVar3 > 0){ #line 1447 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fClamped = Clamp (CalcDist (m_penEnemy ) - (m_fTacticVar4 * m_fTacticVar3 ) , 0.0f , m_fTacticVar4 ); #line 1448 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fDistanceRatio = fClamped / (m_fTacticVar4 * (1 - m_fTacticVar3 )); #line 1449 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1451 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fTimeRatio = 1.0f; #line 1452 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fTacticVar2 > 0){ #line 1453 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fTimeRatio = 1.0f - (ClampUp ((_pTimer -> CurrentTick () - m_tmTacticsActivation ) / m_fTacticVar2 , 1.0f)); #line 1454 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1456 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (1) = m_fTacticVar1 * fDistanceRatio * fTimeRatio ; #line 1457 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (2) = 0.0f; #line 1458 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (3) = 0.0f; #line 1460 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mHeading ; #line 1461 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MakeRotationMatrixFast (mHeading , angEnemy ); #line 1462 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * ! en_mRotation ; #line 1463 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * mHeading ; #line 1464 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * en_mRotation ; #line 1466 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" break ;} #line 1468 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case TCT_PARALLEL_RANDOM_DISTANCE : { #line 1470 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vLinePlayerToSpawn = m_vTacticsStartPosition - m_penEnemy -> GetPlacement () . pl_PositionVector ; #line 1472 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vLinePlayerToThis = GetPlacement () . pl_PositionVector - m_penEnemy -> GetPlacement () . pl_PositionVector ; #line 1474 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fThisOnLine = (vLinePlayerToThis % vLinePlayerToSpawn ) / vLinePlayerToSpawn . Length (); #line 1475 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vThisOnLine = m_penEnemy -> GetPlacement () . pl_PositionVector + vLinePlayerToSpawn . SafeNormalize () * fThisOnLine ; #line 1477 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fLineDist = (GetPlacement () . pl_PositionVector - vThisOnLine ) . Length (); #line 1479 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mHeading ; #line 1483 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(vLinePlayerToThis . Length () < m_fTacticVar1 ){ #line 1484 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bTacticActive = FALSE ; #line 1486 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(fLineDist < m_fTacticVar1 ){ #line 1487 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fLineDist < 1.0f){fLineDist = 1.0f;} #line 1488 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (1) = m_fTacticVar4 / fLineDist ; #line 1489 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (2) = 0.0f; #line 1490 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (3) = 0.0f; #line 1492 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MakeRotationMatrixFast (mHeading , angEnemy ); #line 1493 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * ! en_mRotation ; #line 1494 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * mHeading ; #line 1495 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * en_mRotation ; #line 1497 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(fLineDist > m_fTacticVar1 + m_fTacticVar2 ){ #line 1498 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fLineDist < 1.0f){fLineDist = 1.0f;} #line 1499 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (1) = - m_fTacticVar4 / fLineDist ; #line 1500 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (2) = 0.0f; #line 1501 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (3) = 0.0f; #line 1503 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MakeRotationMatrixFast (mHeading , angEnemy ); #line 1504 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * ! en_mRotation ; #line 1505 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * mHeading ; #line 1506 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * en_mRotation ; #line 1508 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1509 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = - vLinePlayerToSpawn ; #line 1510 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1511 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" break ;} #line 1513 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case TCT_STATIC_RANDOM_V_DISTANCE : { #line 1514 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(_pTimer -> CurrentTick () < m_tmTacticsActivation + m_fTacticVar2 ){ #line 1515 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (1) = m_fTacticVar1 ; #line 1516 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (2) = 0.0f; #line 1517 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" angEnemy (3) = 0.0f; #line 1518 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1519 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bTacticActive = FALSE ; #line 1520 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1522 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mHeading ; #line 1523 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MakeRotationMatrixFast (mHeading , angEnemy ); #line 1524 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * ! en_mRotation ; #line 1525 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * mHeading ; #line 1526 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDesiredPos = vDesiredPos * en_mRotation ; #line 1528 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" break ;} #line 1529 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1530 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1531 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1533 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::StartTacticsNow(void) { #line 1534 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmTacticsActivation = - 1.0f; #line 1535 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1541 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::CanAttackEnemy(CEntity * penTarget,FLOAT fCosAngle) { #line 1542 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsInPlaneFrustum (penTarget , fCosAngle )){ #line 1543 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsVisibleCheckAll (penTarget )){ #line 1544 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 1545 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1546 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1547 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1548 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } BOOL CEnemyBase::CanHitEnemy(CEntity * penTarget,FLOAT fCosAngle) { #line 1552 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsInFrustum (penTarget , fCosAngle )){ #line 1553 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return IsVisibleCheckAll (penTarget ); #line 1554 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1555 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1556 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1559 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::SeeEntity(CEntity * pen,FLOAT fCosAngle) { #line 1560 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsInFrustum (pen , fCosAngle )){ #line 1561 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return IsVisible (pen ); #line 1562 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1563 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1564 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1567 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::SeeEntityInPlane(CEntity * pen,FLOAT fCosAngle) { #line 1568 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CalcPlaneDist (pen ); #line 1569 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsInPlaneFrustum (pen , fCosAngle )){ #line 1570 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return IsVisible (pen ); #line 1571 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1572 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1573 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1576 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::PreparePropelledProjectile(CPlacement3D & plProjectile,FLOAT3D vShootTarget, #line 1577 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D & vOffset,ANGLE3D & aOffset) #line 1578 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1579 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDiff = (vShootTarget - (GetPlacement () . pl_PositionVector + vOffset * GetRotationMatrix ())) . SafeNormalize (); #line 1582 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D mToTargetX , mToTargetY , mToTargetZ ; #line 1583 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetZ = - vDiff ; #line 1584 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetY = - en_vGravityDir ; #line 1585 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetX = (mToTargetY * mToTargetZ ) . SafeNormalize (); #line 1586 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetY = (mToTargetZ * mToTargetX ) . SafeNormalize (); #line 1587 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mToTarget ; #line 1588 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTarget (1 , 1) = mToTargetX (1);mToTarget (1 , 2) = mToTargetY (1);mToTarget (1 , 3) = mToTargetZ (1); #line 1589 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTarget (2 , 1) = mToTargetX (2);mToTarget (2 , 2) = mToTargetY (2);mToTarget (2 , 3) = mToTargetZ (2); #line 1590 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTarget (3 , 1) = mToTargetX (3);mToTarget (3 , 2) = mToTargetY (3);mToTarget (3 , 3) = mToTargetZ (3); #line 1593 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" plProjectile . pl_PositionVector = GetPlacement () . pl_PositionVector + vOffset * GetRotationMatrix (); #line 1594 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mDirection ; #line 1595 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MakeRotationMatrixFast (mDirection , aOffset ); #line 1596 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" DecomposeRotationMatrixNoSnap (plProjectile . pl_OrientationAngle , mToTarget * mDirection ); #line 1597 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1600 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::PrepareFreeFlyingProjectile(CPlacement3D & plProjectile,FLOAT3D vShootTarget, #line 1601 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D & vOffset,ANGLE3D & aOffset) #line 1602 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1603 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDiff = (vShootTarget - (GetPlacement () . pl_PositionVector + vOffset * GetRotationMatrix ())) . SafeNormalize (); #line 1606 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D mToTargetX , mToTargetY , mToTargetZ ; #line 1607 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetZ = - vDiff ; #line 1608 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetY = - en_vGravityDir ; #line 1609 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetX = (mToTargetY * mToTargetZ ) . SafeNormalize (); #line 1610 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTargetZ = (mToTargetX * mToTargetY ) . SafeNormalize (); #line 1611 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mToTarget ; #line 1612 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTarget (1 , 1) = mToTargetX (1);mToTarget (1 , 2) = mToTargetY (1);mToTarget (1 , 3) = mToTargetZ (1); #line 1613 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTarget (2 , 1) = mToTargetX (2);mToTarget (2 , 2) = mToTargetY (2);mToTarget (2 , 3) = mToTargetZ (2); #line 1614 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" mToTarget (3 , 1) = mToTargetX (3);mToTarget (3 , 2) = mToTargetY (3);mToTarget (3 , 3) = mToTargetZ (3); #line 1617 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" plProjectile . pl_PositionVector = GetPlacement () . pl_PositionVector + vOffset * GetRotationMatrix (); #line 1618 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mDirection ; #line 1619 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MakeRotationMatrixFast (mDirection , aOffset ); #line 1620 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" DecomposeRotationMatrixNoSnap (plProjectile . pl_OrientationAngle , mToTarget * mDirection ); #line 1621 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1624 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * CEnemyBase::ShootProjectile(enum ProjectileType pt,FLOAT3D & vOffset,ANGLE3D & aOffset) { #line 1625 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_penEnemy != NULL ); #line 1628 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" EntityInfo * peiTarget = (EntityInfo *) (m_penEnemy -> GetEntityInfo ()); #line 1629 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vShootTarget ; #line 1630 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetEntityInfoPosition (m_penEnemy , peiTarget -> vTargetCenter , vShootTarget ); #line 1633 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPlacement3D pl ; #line 1634 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PreparePropelledProjectile (pl , vShootTarget , vOffset , aOffset ); #line 1635 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penProjectile = CreateEntity (pl , CLASS_PROJECTILE ); #line 1636 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ELaunchProjectile eLaunch ; #line 1637 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eLaunch . penLauncher = this ; #line 1638 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eLaunch . fStretch = 1.0f; #line 1639 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eLaunch . prtType = pt ; #line 1640 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penProjectile -> Initialize (eLaunch ); #line 1642 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return penProjectile ; #line 1643 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1646 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * CEnemyBase::ShootProjectileAt(FLOAT3D vShootTarget,enum ProjectileType pt,FLOAT3D & vOffset,ANGLE3D & aOffset) { #line 1649 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPlacement3D pl ; #line 1650 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PreparePropelledProjectile (pl , vShootTarget , vOffset , aOffset ); #line 1651 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penProjectile = CreateEntity (pl , CLASS_PROJECTILE ); #line 1652 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ELaunchProjectile eLaunch ; #line 1653 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eLaunch . penLauncher = this ; #line 1654 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eLaunch . prtType = pt ; #line 1655 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penProjectile -> Initialize (eLaunch ); #line 1657 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return penProjectile ; #line 1658 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1661 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * CEnemyBase::ShootPredictedProjectile(enum ProjectileType pt,FLOAT3D vPredictedPos,FLOAT3D & vOffset,ANGLE3D & aOffset) { #line 1662 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_penEnemy != NULL ); #line 1665 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" EntityInfo * peiTarget = (EntityInfo *) (m_penEnemy -> GetEntityInfo ()); #line 1666 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vShootTarget = vPredictedPos ; #line 1667 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(peiTarget != NULL ) #line 1668 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1670 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vBody = FLOAT3D (peiTarget -> vTargetCenter [ 0 ] , peiTarget -> vTargetCenter [ 1 ] , peiTarget -> vTargetCenter [ 2 ]); #line 1671 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATmatrix3D mRotation ; #line 1672 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MakeRotationMatrixFast (mRotation , m_penEnemy -> GetPlacement () . pl_OrientationAngle ); #line 1673 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vShootTarget = vPredictedPos + vBody * mRotation ; #line 1674 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1676 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPlacement3D pl ; #line 1677 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PreparePropelledProjectile (pl , vShootTarget , vOffset , aOffset ); #line 1678 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penProjectile = CreateEntity (pl , CLASS_PROJECTILE ); #line 1679 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ELaunchProjectile eLaunch ; #line 1680 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eLaunch . penLauncher = this ; #line 1681 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eLaunch . prtType = pt ; #line 1682 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penProjectile -> Initialize (eLaunch ); #line 1684 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return penProjectile ; #line 1685 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1687 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::WouldNotLeaveAttackRadius(void) #line 1688 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1689 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fAttackRadius <= 0){ #line 1690 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE ; #line 1691 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1693 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL bInsideNow = (m_vStartPosition - GetPlacement () . pl_PositionVector ) . Length () < m_fAttackRadius ; #line 1695 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL bEnemyTowardsCenter = #line 1696 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" (m_vStartPosition - m_penEnemy -> GetPlacement () . pl_PositionVector ) . Length () < #line 1697 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" (GetPlacement () . pl_PositionVector - m_penEnemy -> GetPlacement () . pl_PositionVector ) . Length (); #line 1698 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return bInsideNow || bEnemyTowardsCenter ; #line 1699 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } BOOL CEnemyBase::MayMoveToAttack(void) #line 1703 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1705 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CMovableEntity * pen = (CMovableEntity *) & * m_penEnemy ; #line 1706 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CContentType & ctUp = pen -> en_pwoWorld -> wo_actContentTypes [ pen -> en_iUpContent ]; #line 1707 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL bEnemyDiving = ! (ctUp . ct_ulFlags & CTF_BREATHABLE_LUNGS ); #line 1709 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return WouldNotLeaveAttackRadius () && ! bEnemyDiving ; #line 1710 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } BOOL CEnemyBase::ShouldBlowUp(void) #line 1718 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1720 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsOfClass (this , "ExotechLarva")){return TRUE ;} #line 1723 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return #line 1725 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetSP () -> sp_bGibs && #line 1727 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetHealth () <= 0 && #line 1729 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDamage . Length () > m_fBlowUpAmount && #line 1731 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fSpiritStartTime == 0; #line 1732 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1736 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::BlowUpBase(void) #line 1737 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1739 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BlowUp (); #line 1740 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::BlowUp(void) #line 1745 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1747 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BlowUpNotify (); #line 1748 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" const BOOL bGibs = GetSP () -> sp_bGibs ; #line 1750 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vNormalizedDamage = m_vDamage - m_vDamage * (m_fBlowUpAmount / m_vDamage . Length ()); #line 1751 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vNormalizedDamage /= Sqrt (vNormalizedDamage . Length ()); #line 1752 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vNormalizedDamage *= 0.75f; #line 1753 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vBodySpeed = en_vCurrentTranslationAbsolute - en_vGravityDir * (en_vGravityDir % en_vCurrentTranslationAbsolute ); #line 1756 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(bGibs && ! m_bRobotBlowup ) #line 1757 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1759 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" const INDEX iBloodType = GetSP () -> sp_iBlood ; #line 1761 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ULONG ulFleshTexture = TEXTURE_FLESH_GREEN ; #line 1762 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ULONG ulFleshModel = MODEL_FLESH ; #line 1763 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(iBloodType == 2){ulFleshTexture = TEXTURE_FLESH_RED ;} #line 1765 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Debris_Begin (EIBT_FLESH , DPT_BLOODTRAIL , BET_BLOODSTAIN , m_fBlowUpSize , vNormalizedDamage , vBodySpeed , 1.0f , 0.0f); #line 1766 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" for(INDEX iDebris = 0;iDebris < m_fBodyParts ;iDebris ++){ #line 1768 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(iBloodType == 3){ #line 1769 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" switch(IRnd () % 5){ #line 1770 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case 1: {ulFleshModel = MODEL_FLESH_APPLE ;ulFleshTexture = TEXTURE_FLESH_APPLE ;break ;} #line 1771 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case 2: {ulFleshModel = MODEL_FLESH_BANANA ;ulFleshTexture = TEXTURE_FLESH_BANANA ;break ;} #line 1772 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case 3: {ulFleshModel = MODEL_FLESH_BURGER ;ulFleshTexture = TEXTURE_FLESH_BURGER ;break ;} #line 1773 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" case 4: {ulFleshModel = MODEL_FLESH_LOLLY ;ulFleshTexture = TEXTURE_FLESH_LOLLY ;break ;} #line 1774 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" default :{ulFleshModel = MODEL_FLESH_ORANGE ;ulFleshTexture = TEXTURE_FLESH_ORANGE ;break ;} #line 1775 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1776 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1777 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Debris_Spawn (this , this , ulFleshModel , ulFleshTexture , 0 , 0 , 0 , IRnd () % 4 , 0.5f , #line 1778 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D (FRnd () * 0.6f + 0.2f , FRnd () * 0.6f + 0.2f , FRnd () * 0.6f + 0.2f)); #line 1779 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1781 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" LeaveStain (FALSE ); #line 1782 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1785 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(bGibs && m_bRobotBlowup ) #line 1786 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1788 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Debris_Begin (EIBT_ROBOT , DPR_SMOKETRAIL , BET_EXPLOSIONSTAIN , m_fBlowUpSize , vNormalizedDamage , vBodySpeed , 1.0f , 0.0f); #line 1789 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" for(INDEX iDebris = 0;iDebris < m_fBodyParts ;iDebris ++){ #line 1790 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Debris_Spawn (this , this , MODEL_MACHINE , TEXTURE_MACHINE , 0 , 0 , 0 , IRnd () % 4 , 0.2f , #line 1791 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D (FRnd () * 0.6f + 0.2f , FRnd () * 0.6f + 0.2f , FRnd () * 0.6f + 0.2f)); #line 1792 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1794 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPlacement3D plExplosion = GetPlacement (); #line 1795 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT ); #line 1796 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ESpawnEffect eSpawnEffect ; #line 1797 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ; #line 1798 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnEffect . betType = BET_BOMB ; #line 1799 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fSize = m_fBlowUpSize * 0.3f; #line 1800 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSpawnEffect . vStretch = FLOAT3D (fSize , fSize , fSize ); #line 1801 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penExplosion -> Initialize (eSpawnEffect ); #line 1802 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1805 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SwitchToEditorModel (); #line 1806 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetPhysicsFlags (EPF_MODEL_IMMATERIAL ); #line 1807 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetCollisionFlags (ECF_IMMATERIAL ); #line 1808 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::LeaveStain(BOOL bGrow) #line 1817 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1818 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ESpawnEffect ese ; #line 1819 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPoint ; #line 1820 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATplane3D vPlaneNormal ; #line 1821 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fDistanceToEdge ; #line 1823 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOATaabbox3D box ; #line 1824 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetBoundingBox (box ); #line 1827 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(GetNearestPolygon (vPoint , vPlaneNormal , fDistanceToEdge )){ #line 1829 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if((vPoint - GetPlacement () . pl_PositionVector ) . Length () < 0.5f #line 1830 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" && (m_vLastStain - vPoint ) . Length () > 1.0f){ #line 1831 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vLastStain = vPoint ; #line 1832 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fStretch = box . Size () . Length (); #line 1833 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . colMuliplier = C_WHITE | CT_OPAQUE ; #line 1835 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(bGrow ){ #line 1836 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . betType = BET_BLOODSTAINGROW ; #line 1837 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . vStretch = FLOAT3D (fStretch * 1.5f , fStretch * 1.5f , 1.0f); #line 1838 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1839 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . betType = BET_BLOODSTAIN ; #line 1840 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . vStretch = FLOAT3D (fStretch * 0.75f , fStretch * 0.75f , 1.0f); #line 1841 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1842 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . vNormal = FLOAT3D (vPlaneNormal ); #line 1843 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . vDirection = FLOAT3D (0 , 0 , 0); #line 1844 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPos = vPoint + ese . vNormal / 50.0f * (FRnd () + 0.5f); #line 1845 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penEffect = CreateEntity (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)) , CLASS_BASIC_EFFECT ); #line 1846 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penEffect -> Initialize (ese ); #line 1847 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1848 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1849 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::AdjustDifficulty(void) #line 1852 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1853 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fMoveSpeed = GetSP () -> sp_fEnemyMovementSpeed ; #line 1854 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fAttackSpeed = GetSP () -> sp_fEnemyMovementSpeed ; #line 1857 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fAttackRunSpeed *= fMoveSpeed ; #line 1858 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aAttackRotateSpeed *= fMoveSpeed ; #line 1859 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fCloseRunSpeed *= fMoveSpeed ; #line 1860 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aCloseRotateSpeed *= fMoveSpeed ; #line 1861 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fAttackFireTime *= 1 / fAttackSpeed ; #line 1862 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fCloseFireTime *= 1 / fAttackSpeed ; #line 1877 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1885 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::WoundedNotify(const EDamage & eDamage) #line 1886 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1888 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy == NULL ){ #line 1890 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1891 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1894 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(eDamage . dmtType != DMT_CLOSERANGE && eDamage . dmtType != DMT_CHAINSAW ){ #line 1896 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ESound eSound ; #line 1897 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSound . EsndtSound = SNDT_YELL ; #line 1898 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSound . penTarget = m_penEnemy ; #line 1899 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEventInRange (eSound , FLOATaabbox3D (GetPlacement () . pl_PositionVector , 25.0f)); #line 1900 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1901 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1904 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::SeeNotify() #line 1905 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1907 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy == NULL ){ #line 1909 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1910 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1912 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ESound eSound ; #line 1913 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSound . EsndtSound = SNDT_SHOUT ; #line 1914 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eSound . penTarget = m_penEnemy ; #line 1915 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEventInRange (eSound , FLOATaabbox3D (GetPlacement () . pl_PositionVector , 50.0f)); #line 1916 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::StandingAnim(void) {} void CEnemyBase::StandingAnimFight(void) {StandingAnim ();} void CEnemyBase::WalkingAnim(void) {} void CEnemyBase::RunningAnim(void) {} void CEnemyBase::RotatingAnim(void) {} void CEnemyBase::ChargeAnim(void) {} INDEX CEnemyBase::AnimForDamage(FLOAT fDamage) {return 0;} void CEnemyBase::BlowUpNotify(void) {} INDEX CEnemyBase::AnimForDeath(void) {return 0;} FLOAT CEnemyBase::WaitForDust(FLOAT3D & vStretch) {return - 1;} void CEnemyBase::DeathNotify(void) {} void CEnemyBase::IdleSound(void) {} void CEnemyBase::SightSound(void) {} void CEnemyBase::WoundSound(void) {} void CEnemyBase::DeathSound(void) {} FLOAT CEnemyBase::GetLockRotationSpeed(void) {return 2000.0f;} #line 1942 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::RenderParticles(void) { #line 1944 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(GetRenderType () != CEntity :: RT_MODEL && GetRenderType () != CEntity :: RT_SKAMODEL ){ #line 1945 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return ; #line 1946 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1948 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fSpiritStartTime != 0.0f) #line 1949 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1952 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Particles_Death (this , m_fSpiritStartTime ); #line 1953 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1954 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } void CEnemyBase::EnemyPostInit(void) {} #line 1960 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::HandleEvent(const CEntityEvent & ee) #line 1961 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1962 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(ee . ee_slEvent == EVENTCODE_ETouch ) #line 1963 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1964 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(GetCrushHealth () != 0.0f) #line 1965 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1966 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ETouch eTouch = ((ETouch &) ee ); #line 1967 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsOfClass (eTouch . penOther , "ModelHolder2") || #line 1968 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" IsOfClass (eTouch . penOther , "MovingBrush") || #line 1969 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" IsOfClass (eTouch . penOther , "DestroyableArchitecture")) #line 1970 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1971 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" InflictDirectDamage (eTouch . penOther , this , DMT_EXPLOSION , GetCrushHealth () , #line 1972 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eTouch . penOther -> GetPlacement () . pl_PositionVector , - (FLOAT3D &) eTouch . plCollision ); #line 1973 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1974 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1975 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1976 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return CMovableModelEntity :: HandleEvent (ee ); #line 1977 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1980 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::GetAnimLength(int iAnim) #line 1981 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1982 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL ){ #line 1983 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return GetModelInstance () -> GetAnimLength (iAnim ); #line 1984 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1985 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return GetModelObject () -> GetAnimLength (iAnim ); #line 1986 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1987 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1990 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::GetCurrentAnimLength() #line 1991 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 1992 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL ){ #line 1993 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return 0.5f; #line 1994 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 1995 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return GetModelObject () -> GetCurrentAnimLength (); #line 1996 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 1997 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2000 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL CEnemyBase::IsAnimFinished() #line 2001 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2002 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL ){ #line 2003 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE ; #line 2004 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2005 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return GetModelObject () -> IsAnimFinished (); #line 2006 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2007 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2010 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT CEnemyBase::GetPassedTime() #line 2011 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2012 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL ){ #line 2013 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return 0.0f; #line 2014 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2015 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return GetModelObject () -> GetPassedTime (); #line 2016 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2017 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2019 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D & CEnemyBase::GetModelStretch() #line 2020 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2021 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL ){ #line 2022 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return GetModelInstance () -> mi_vStretch ; #line 2023 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2024 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return GetModelObject () -> mo_Stretch ; #line 2025 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2026 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2029 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::StretchModel(FLOAT3D vStretch) #line 2030 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2031 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL ){ #line 2032 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelInstance () -> StretchModel (vStretch ); #line 2033 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2034 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelObject () -> StretchModel (vStretch ); #line 2035 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2036 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2039 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" void CEnemyBase::StretchSingleModel(FLOAT3D vStretch) #line 2040 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2041 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_RenderType == RT_SKAMODEL ){ #line 2042 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelInstance () -> StretchSingleModel (vStretch ); #line 2043 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2044 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetModelObject () -> StretchSingleModel (vStretch ); #line 2045 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2046 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2050 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SLONG CEnemyBase::GetUsedMemory(void) #line 2051 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2053 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SLONG slUsedMemory = sizeof (CEnemyBase ) - sizeof (CMovableModelEntity ) + CMovableModelEntity :: GetUsedMemory (); #line 2055 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" slUsedMemory += m_strDescription . Length (); #line 2056 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" slUsedMemory += m_strName . Length (); #line 2057 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" slUsedMemory += 1 * sizeof (CSoundObject); #line 2058 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return slUsedMemory ; #line 2059 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } BOOL CEnemyBase:: #line 2070 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MoveToDestination(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_MoveToDestination ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::MoveToDestination expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2073 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveFrequency = 0.25f; #line 2074 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveTime = _pTimer -> CurrentTick () + 45.0f; #line 2076 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x01360006, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360006_MoveToDestination_03(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360006 if(!(CalcDistanceInPlaneToDestination () > m_fMoveSpeed * m_fMoveFrequency * 2.0f && #line 2077 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveTime > _pTimer -> CurrentTick ())){ Jump(STATE_CURRENT,0x01360007, FALSE, EInternal());return TRUE;} #line 2079 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(m_fMoveFrequency ); Jump(STATE_CURRENT, 0x01360004, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360004_MoveToDestination_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360004 switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 2082 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ULONG ulFlags = SetDesiredMovement (); #line 2083 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MovementAnimation (ulFlags ); #line 2084 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2085 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput; UnsetTimer();Jump(STATE_CURRENT,0x01360005, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break; #line 2087 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x01360005_MoveToDestination_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360005 Jump(STATE_CURRENT,0x01360006, FALSE, EInternal());return TRUE; #line 2088 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x01360007_MoveToDestination_04(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360007 #line 2091 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2091 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2095 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MoveToRandomPatrolPosition(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_MoveToRandomPatrolPosition ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::MoveToRandomPatrolPosition expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2098 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(! IsOfClass (m_penMarker , "Enemy Marker")){ #line 2100 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (FALSE ); #line 2102 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2102 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2103 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2105 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEnemyMarker * pem = (CEnemyMarker *) & * m_penMarker ; #line 2108 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fMin = pem -> m_fPatrolAreaInner ; #line 2109 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fMax = pem -> m_fPatrolAreaOuter ; #line 2110 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fMin < 0){ #line 2111 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fMin = 0; #line 2112 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2113 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(fMax < fMin ){ #line 2114 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fMax = fMin ; #line 2115 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2116 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fR = Lerp (fMin , fMax , FRnd ()); #line 2117 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fA = FRnd () * 360.0f; #line 2118 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vOffsetDir ; #line 2119 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetHeadingDirection (fA , vOffsetDir ); #line 2120 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = m_vStartPosition + vOffsetDir * fR ; #line 2123 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fWalkSpeed ); #line 2124 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aWalkRotateSpeed ); #line 2125 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" WalkingAnim (); #line 2128 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_MoveToDestination, TRUE; Jump(STATE_CURRENT, 0x01360009, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360009_MoveToRandomPatrolPosition_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360009 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_MoveToDestination, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0136000a, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136000a_MoveToRandomPatrolPosition_02(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x0136000a const EReturn&__e= (EReturn&)__eeInput; ; #line 2131 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2131 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2135 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" DoPatrolling(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_DoPatrolling ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::DoPatrolling expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2138 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x01360010, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360010_DoPatrolling_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360010 if(!(TRUE )){ Jump(STATE_CURRENT,0x01360011, FALSE, EInternal());return TRUE;} #line 2140 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2141 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnim (); #line 2143 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(0.5f + FRnd () / 2); Jump(STATE_CURRENT, 0x0136000c, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136000c_DoPatrolling_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136000c switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0136000d, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136000d_DoPatrolling_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136000d ; #line 2145 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_MoveToRandomPatrolPosition, TRUE; Jump(STATE_CURRENT, 0x0136000e, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136000e_DoPatrolling_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136000e switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_MoveToRandomPatrolPosition, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0136000f, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136000f_DoPatrolling_04(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x0136000f const EReturn&__e= (EReturn&)__eeInput; ;Jump(STATE_CURRENT,0x01360010, FALSE, EInternal());return TRUE; #line 2146 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x01360011_DoPatrolling_06(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360011 ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2150 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BeIdle(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_BeIdle ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::BeIdle expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2153 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (EStart ()); #line 2156 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnim (); #line 2159 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x01360015, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360015_BeIdle_03(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360015 if(!(TRUE )){ Jump(STATE_CURRENT,0x01360016, FALSE, EInternal());return TRUE;} #line 2161 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(Lerp (5.0f , 20.0f , FRnd ())); Jump(STATE_CURRENT, 0x01360013, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360013_BeIdle_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360013 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360014, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360014_BeIdle_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360014 ; #line 2163 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" IdleSound ();Jump(STATE_CURRENT,0x01360015, FALSE, EInternal());return TRUE; #line 2164 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x01360016_BeIdle_04(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360016 ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2168 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ReturnToStartPosition(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_ReturnToStartPosition ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::ReturnToStartPosition expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2170 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT, STATE_CEnemyBase_BeIdle, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2212 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MoveThroughMarkers(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_MoveThroughMarkers ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::MoveThroughMarkers expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2215 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (EStart ()); #line 2218 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x01360023, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360023_MoveThroughMarkers_11(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360023 if(!(m_penMarker != NULL && IsOfClass (m_penMarker , "Enemy Marker"))){ Jump(STATE_CURRENT,0x01360024, FALSE, EInternal());return TRUE;} #line 2219 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEnemyMarker * pem = (CEnemyMarker *) & * m_penMarker ; #line 2222 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vStartPosition = m_penMarker -> GetPlacement () . pl_PositionVector ; #line 2224 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fR = FRnd () * pem -> m_fMarkerRange ; #line 2225 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fA = FRnd () * 360.0f; #line 2226 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = m_vStartPosition + FLOAT3D (CosFast (fA ) * fR , 0 , SinFast (fA ) * fR ); #line 2228 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(pem -> m_betRunToMarker == BET_TRUE ){ #line 2230 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fAttackRunSpeed ); #line 2231 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aAttackRotateSpeed ); #line 2233 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" RunningAnim (); #line 2235 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2237 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = GetProp (m_fWalkSpeed ); #line 2238 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetProp (m_aWalkRotateSpeed ); #line 2240 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" WalkingAnim (); #line 2241 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2244 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_MoveToDestination, TRUE; Jump(STATE_CURRENT, 0x01360019, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360019_MoveThroughMarkers_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360019 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_MoveToDestination, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0136001a, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136001a_MoveThroughMarkers_02(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x0136001a const EReturn&__e= (EReturn&)__eeInput; ; #line 2247 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEnemyMarker * pem = (CEnemyMarker *) & * m_penMarker ; #line 2248 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetBoolFromBoolEType (m_bBlind , pem -> m_betBlind ); #line 2249 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetBoolFromBoolEType (m_bDeaf , pem -> m_betDeaf ); #line 2252 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(pem -> m_bStartTactics ){ #line 2254 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bBlind = FALSE ; #line 2255 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bDeaf = FALSE ; #line 2257 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StartTacticsNow (); #line 2258 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2261 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(!(pem -> m_fPatrolTime > 0.0f)){ Jump(STATE_CURRENT,0x0136001d, FALSE, EInternal());return TRUE;} #line 2263 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SpawnReminder (this , pem -> m_fPatrolTime , 0); #line 2265 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x0136001b, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136001b_MoveThroughMarkers_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136001b switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 2269 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_DoPatrolling, TRUE, EVoid());return TRUE; #line 2270 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EReminder):{const EReminder&e= (EReminder&)__eeInput; #line 2274 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x0136001c, FALSE, EInternal());return TRUE; #line 2275 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 2276 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x0136001c_MoveThroughMarkers_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136001c Jump(STATE_CURRENT,0x0136001d, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x0136001d_MoveThroughMarkers_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136001d #line 2279 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEnemyMarker * pem = (CEnemyMarker *) & * m_penMarker ; #line 2281 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(!(pem -> m_fWaitTime > 0.0f)){ Jump(STATE_CURRENT,0x01360020, FALSE, EInternal());return TRUE;} #line 2283 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2284 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnim (); #line 2286 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(pem -> m_fWaitTime ); Jump(STATE_CURRENT, 0x0136001e, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136001e_MoveThroughMarkers_06(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136001e switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x0136001f, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136001f_MoveThroughMarkers_07(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136001f ;Jump(STATE_CURRENT,0x01360020, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360020_MoveThroughMarkers_08(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360020 #line 2290 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(0.05f); Jump(STATE_CURRENT, 0x01360021, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360021_MoveThroughMarkers_09(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360021 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360022, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360022_MoveThroughMarkers_10(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360022 ; #line 2293 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penMarker = ((CEnemyMarker &) * m_penMarker ) . m_penTarget ;Jump(STATE_CURRENT,0x01360023, FALSE, EInternal());return TRUE; #line 2294 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x01360024_MoveThroughMarkers_12(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360024 #line 2297 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2298 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnim (); #line 2301 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2301 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2310 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" NewEnemySpotted(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_NewEnemySpotted ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::NewEnemySpotted expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2313 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT tmReflex = Lerp (m_tmReflexMin , m_tmReflexMax , FRnd ()); #line 2314 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" tmReflex = ClampDn (tmReflex , 0.0f); #line 2317 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(!(tmReflex >= _pTimer -> TickQuantum )){ Jump(STATE_CURRENT,0x01360028, FALSE, EInternal());return TRUE;} #line 2319 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2320 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnim (); #line 2323 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(tmReflex ); Jump(STATE_CURRENT, 0x01360026, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360026_NewEnemySpotted_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360026 switch(__eeInput.ee_slEvent){case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput; UnsetTimer();Jump(STATE_CURRENT,0x01360027, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&e= (EDamage&)__eeInput; return FALSE;}ASSERT(FALSE);break;case(EVENTCODE_EHitBySpaceShipBeam):{const EHitBySpaceShipBeam&e= (EHitBySpaceShipBeam&)__eeInput; return FALSE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break; #line 2331 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x01360027_NewEnemySpotted_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360027 Jump(STATE_CURRENT,0x01360028, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360028_NewEnemySpotted_03(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360028 #line 2335 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SightSound (); #line 2338 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2338 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2342 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopAttack(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_StopAttack ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::StopAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2344 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (EStart ()); #line 2346 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTargetNone (); #line 2347 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fDamageConfused = 0.0f; #line 2349 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2351 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2351 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2355 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" InitializeAttack(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_InitializeAttack ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::InitializeAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2358 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bBlind = FALSE ; #line 2359 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bDeaf = FALSE ; #line 2361 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SeeNotify (); #line 2362 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (EStop ()); #line 2364 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" AddToFuss (); #line 2366 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vPlayerSpotted = PlayerDestinationPos (); #line 2369 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(CalcDist (m_penEnemy ) < GetProp (m_fCloseDistance )){ #line 2370 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fShootTime = 0.0f; #line 2371 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2372 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fShootTime = _pTimer -> CurrentTick () + FRnd (); #line 2373 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2374 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fDamageConfused = m_fDamageWounded ; #line 2376 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2376 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2381 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" AttackEnemy(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_AttackEnemy ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::AttackEnemy expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2383 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_InitializeAttack, TRUE; Jump(STATE_CURRENT, 0x0136002c, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136002c_AttackEnemy_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136002c switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_InitializeAttack, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0136002d, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136002d_AttackEnemy_02(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x0136002d const EReturn&__e= (EReturn&)__eeInput; ; #line 2386 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x01360030, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360030_AttackEnemy_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360030 if(!(m_penEnemy != NULL )){ Jump(STATE_CURRENT,0x01360031, FALSE, EInternal());return TRUE;} #line 2388 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_PerformAttack, TRUE; Jump(STATE_CURRENT, 0x0136002e, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136002e_AttackEnemy_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136002e switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_PerformAttack, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0136002f, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136002f_AttackEnemy_04(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x0136002f const EReturn&__e= (EReturn&)__eeInput; ;Jump(STATE_CURRENT,0x01360030, FALSE, EInternal());return TRUE; #line 2389 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x01360031_AttackEnemy_06(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360031 #line 2392 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_StopAttack, TRUE; Jump(STATE_CURRENT, 0x01360032, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360032_AttackEnemy_07(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360032 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_StopAttack, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01360033, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360033_AttackEnemy_08(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x01360033 const EReturn&__e= (EReturn&)__eeInput; ; #line 2395 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EBegin ()); #line 2395 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2399 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PerformAttack(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_PerformAttack ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::PerformAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2402 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fRangeLast = 1E9f; #line 2405 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = PlayerDestinationPos (); #line 2406 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 2409 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x01360037, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360037_PerformAttack_03(const CEntityEvent &__eeInput) #line 2410 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360037 if(!(TRUE )){ Jump(STATE_CURRENT,0x01360038, FALSE, EInternal());return TRUE;} #line 2412 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(ShouldCeaseAttack ()){ #line 2414 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTargetNone (); #line 2415 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2415 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2416 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2419 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fEnemyDistance = CalcDist (m_penEnemy ); #line 2421 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fRangeLast > GetProp (m_fCloseDistance ) && fEnemyDistance <= GetProp (m_fCloseDistance )){ #line 2423 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fShootTime = 0.0f; #line 2424 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2425 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fRangeLast = fEnemyDistance ; #line 2428 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveFrequency = GetAttackMoveFrequency (fEnemyDistance ); #line 2429 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PATHPERSISTENT || m_dtDestination == DT_PATHTEMPORARY ){ #line 2430 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveFrequency = 0.1f; #line 2431 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2434 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(m_fMoveFrequency ); Jump(STATE_CURRENT, 0x01360035, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360035_PerformAttack_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360035 switch(__eeInput.ee_slEvent){case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput; UnsetTimer();Jump(STATE_CURRENT,0x01360036, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 2440 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(_pTimer -> CurrentTick () > m_fShootTime ){ #line 2443 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penNewEnemy = GetWatcher () -> CheckCloserPlayer (m_penEnemy , GetThreatDistance ()); #line 2444 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penNewEnemy != NULL ){ #line 2446 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTargetHardForce (penNewEnemy ); #line 2448 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEvent (EReconsiderBehavior ()); #line 2449 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x01360036, FALSE, EInternal());return TRUE; #line 2450 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2453 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsVisible (m_penEnemy )){ #line 2455 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vPlayerSpotted = PlayerDestinationPos (); #line 2457 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PLAYERSPOTTED || m_dtDestination == DT_PATHTEMPORARY ){ #line 2459 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 2460 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2463 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2465 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PLAYERCURRENT ){ #line 2467 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERSPOTTED ; #line 2468 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2469 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2472 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_FireOrHit, TRUE, EVoid());return TRUE; #line 2475 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2477 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if((m_dtDestination == DT_PLAYERSPOTTED || m_dtDestination == DT_PATHTEMPORARY ) #line 2478 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" && IsVisible (m_penEnemy )){ #line 2480 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 2482 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vPlayerSpotted = PlayerDestinationPos (); #line 2483 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2484 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2487 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fAllowedError = m_fMoveSpeed * m_fMoveFrequency * 2.0f; #line 2488 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PATHPERSISTENT || m_dtDestination == DT_PATHTEMPORARY ){ #line 2489 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" fAllowedError = ((CNavigationMarker &) * m_penPathMarker ) . m_fMarkerRange ; #line 2490 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2491 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination != DT_PLAYERCURRENT && #line 2492 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" (CalcDistanceInPlaneToDestination () < fAllowedError || fAllowedError < 0.1f)){ #line 2494 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PLAYERSPOTTED ){ #line 2496 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsVisible (m_penEnemy )){ #line 2498 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PLAYERCURRENT ; #line 2500 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2502 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_dtDestination = DT_PATHTEMPORARY ; #line 2503 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StartPathFinding (); #line 2504 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2506 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_dtDestination == DT_PATHTEMPORARY || m_dtDestination == DT_PATHPERSISTENT ){ #line 2508 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FindNextPathMarker (); #line 2509 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2510 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2513 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_dtDestination == DT_PLAYERCURRENT ){ #line 2515 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = PlayerDestinationPos (); #line 2518 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_dtDestination == DT_PLAYERSPOTTED ){ #line 2520 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = m_vPlayerSpotted ; #line 2521 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2524 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vPosDelta = m_vDesiredPosition - GetPlacement () . pl_PositionVector ; #line 2525 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT fPosDistance = vPosDelta . Length (); #line 2527 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetSpeedsToDesiredPosition (vPosDelta , fPosDistance , m_dtDestination == DT_PLAYERCURRENT ); #line 2530 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ULONG ulFlags = SetDesiredMovement (); #line 2531 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MovementAnimation (ulFlags ); #line 2532 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2533 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETouch):{const ETouch&eTouch= (ETouch&)__eeInput; #line 2536 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IfTargetCrushed (eTouch . penOther , (FLOAT3D &) eTouch . plCollision )) #line 2537 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2538 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2539 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2541 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" else if(CheckTouchForPathFinding (eTouch )){ #line 2543 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x01360036, FALSE, EInternal());return TRUE; #line 2545 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_bTacticActive ){ #line 2547 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(eTouch . penOther -> GetRenderType () == CEntity :: RT_BRUSH ){ #line 2548 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vDir = en_vDesiredTranslationRelative ; #line 2549 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDir . SafeNormalize (); #line 2550 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vDir *= GetRotationMatrix (); #line 2552 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if((eTouch . plCollision % vDir ) < - 0.5f){m_bTacticActive = 0;} #line 2553 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2554 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2555 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2556 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2557 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2559 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE; #line 2560 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2561 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EWouldFall):{const EWouldFall&eWouldFall= (EWouldFall&)__eeInput; #line 2565 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(CheckFallForPathFinding (eWouldFall )){ #line 2567 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x01360036, FALSE, EInternal());return TRUE; #line 2568 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_bTacticActive ){ #line 2570 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bTacticActive = 0; #line 2571 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2573 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2575 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE; #line 2576 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2577 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ESound):{const ESound&e= (ESound&)__eeInput; return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EWatch):{const EWatch&e= (EWatch&)__eeInput; return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EReturn):{const EReturn&e= (EReturn&)__eeInput; UnsetTimer();Jump(STATE_CURRENT,0x01360036, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break; #line 2581 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x01360036_PerformAttack_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360036 Jump(STATE_CURRENT,0x01360037, FALSE, EInternal());return TRUE; #line 2582 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x01360038_PerformAttack_04(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360038 ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2587 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FireOrHit(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_FireOrHit ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::FireOrHit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2590 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(!(CalcDist (m_penEnemy ) < GetProp (m_fCloseDistance ) && CanHitEnemy (m_penEnemy , Cos (AngleDeg (45.0f))))){ Jump(STATE_CURRENT,0x01360041, FALSE, EInternal());return TRUE;} #line 2592 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" AddToFuss (); #line 2594 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2596 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fShootTime = _pTimer -> CurrentTick () + GetProp (m_fCloseFireTime ) * (1.0f + FRnd () / 3.0f); #line 2598 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_Hit, TRUE; Jump(STATE_CURRENT, 0x0136003a, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136003a_FireOrHit_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136003a switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_Hit, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0136003b, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136003b_FireOrHit_02(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x0136003b const EReturn&__e= (EReturn&)__eeInput; ;Jump(STATE_CURRENT,0x01360040, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360041_FireOrHit_08(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360041 if(!(CalcDist (m_penEnemy ) < GetProp (m_fAttackDistance ) && CanAttackEnemy (m_penEnemy , Cos (AngleDeg (45.0f))))){ Jump(STATE_CURRENT,0x0136003f, FALSE, EInternal());return TRUE;} #line 2603 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" AddToFuss (); #line 2605 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2607 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(CalcDist (m_penEnemy ) < GetProp (m_fCloseDistance )){ #line 2608 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fShootTime = _pTimer -> CurrentTick () + GetProp (m_fCloseFireTime ) * (1.0f + FRnd () / 3.0f); #line 2609 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2610 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fShootTime = _pTimer -> CurrentTick () + GetProp (m_fAttackFireTime ) * (1.0f + FRnd () / 3.0f); #line 2611 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2613 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_Fire, TRUE; Jump(STATE_CURRENT, 0x0136003c, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136003c_FireOrHit_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136003c switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_Fire, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x0136003d, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x0136003d_FireOrHit_04(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x0136003d const EReturn&__e= (EReturn&)__eeInput; ;Jump(STATE_CURRENT,0x0136003e, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x0136003f_FireOrHit_06(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136003f { #line 2618 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fShootTime = _pTimer -> CurrentTick () + 0.25f; #line 2619 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }Jump(STATE_CURRENT,0x0136003e, FALSE, EInternal());return TRUE;} BOOL CEnemyBase::H0x0136003e_FireOrHit_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136003e Jump(STATE_CURRENT,0x01360040, FALSE, EInternal());return TRUE;} BOOL CEnemyBase::H0x01360040_FireOrHit_07(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360040 #line 2622 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2622 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2630 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Hit(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_Hit ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::Hit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2632 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2632 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2636 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Fire(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_Fire ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2638 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2638 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2646 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" LockOnEnemy(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_LockOnEnemy ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::LockOnEnemy expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2649 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2651 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ChargeAnim (); #line 2653 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fLockStartTime = _pTimer -> CurrentTick (); #line 2654 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x01360047, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x01360047_LockOnEnemy_03(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360047 if(!(m_fLockStartTime + GetProp (m_fLockOnEnemyTime ) > _pTimer -> CurrentTick ())){ Jump(STATE_CURRENT,0x01360048, FALSE, EInternal());return TRUE;} #line 2656 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveFrequency = 0.05f; #line 2657 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(m_fMoveFrequency ); Jump(STATE_CURRENT, 0x01360045, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360045_LockOnEnemy_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360045 switch(__eeInput.ee_slEvent){case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput; UnsetTimer();Jump(STATE_CURRENT,0x01360046, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 2660 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vDesiredPosition = PlayerDestinationPos (); #line 2662 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(! IsInPlaneFrustum (m_penEnemy , CosFast (5.0f))){ #line 2663 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = 0.0f; #line 2664 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = GetLockRotationSpeed (); #line 2666 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2667 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fMoveSpeed = 0.0f; #line 2668 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_aRotateSpeed = 0.0f; #line 2669 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2671 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ULONG ulFlags = SetDesiredMovement (); #line 2673 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2674 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 2675 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x01360046_LockOnEnemy_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360046 Jump(STATE_CURRENT,0x01360047, FALSE, EInternal());return TRUE; #line 2676 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x01360048_LockOnEnemy_04(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360048 #line 2678 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopRotating (); #line 2681 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2681 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2685 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ChargeHitEnemy(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_ChargeHitEnemy ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::ChargeHitEnemy expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2688 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(GetAnimLength (m_iChargeHitAnimation )); Jump(STATE_CURRENT, 0x0136004a, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136004a_ChargeHitEnemy_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136004a 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,0x0136004b, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&e= (EDamage&)__eeInput; return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EReminder):{const EReminder&e= (EReminder&)__eeInput; #line 2696 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2697 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2698 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETouch):{const ETouch&etouch= (ETouch&)__eeInput; #line 2702 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if((etouch . penOther -> GetFlags () & ENF_ALIVE ) && IsInPlaneFrustum (etouch . penOther , CosFast (60.0f))){ #line 2704 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" FLOAT3D vSpeed ; #line 2705 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetHeadingDirection (m_fChargeHitAngle , vSpeed ); #line 2707 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" InflictDirectDamage (etouch . penOther , this , DMT_CLOSERANGE , m_fChargeHitDamage , FLOAT3D (0 , 0 , 0) , vSpeed ); #line 2709 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" vSpeed = vSpeed * m_fChargeHitSpeed ; #line 2710 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" KickEntity (etouch . penOther , vSpeed ); #line 2712 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x0136004b, FALSE, EInternal());return TRUE; #line 2713 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2714 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE; #line 2715 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 2716 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x0136004b_ChargeHitEnemy_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136004b #line 2718 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(!(! IsAnimFinished ())){ Jump(STATE_CURRENT,0x0136004e, FALSE, EInternal());return TRUE;} #line 2720 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(GetCurrentAnimLength () - GetPassedTime ()); Jump(STATE_CURRENT, 0x0136004c, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136004c_ChargeHitEnemy_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136004c 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,0x0136004d, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EReminder):{const EReminder&e= (EReminder&)__eeInput; #line 2726 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2727 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2728 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 2729 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x0136004d_ChargeHitEnemy_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136004d Jump(STATE_CURRENT,0x0136004e, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x0136004e_ChargeHitEnemy_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136004e #line 2733 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2733 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2741 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BeWounded(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_BeWounded ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDamage, "CEnemyBase::BeWounded expects 'EDamage' as input!"); const EDamage &eDamage = (const EDamage &)__eeInput; #line 2743 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2745 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(GetAnimLength (AnimForDamage (eDamage . fAmount ))); Jump(STATE_CURRENT, 0x01360050, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360050_BeWounded_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360050 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360051, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360051_BeWounded_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360051 ; #line 2746 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 2746 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2750 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Die(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_Die ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDeath, "CEnemyBase::Die expects 'EDeath' as input!"); const EDeath &eDeath = (const EDeath &)__eeInput; #line 2753 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetFlags (GetFlags () & ~ ENF_ALIVE ); #line 2756 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penKiller = eDeath . eLastDamage . penInflictor ; #line 2757 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penKiller == NULL || ! IsOfClass (penKiller , "Player")){ #line 2758 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penKiller = m_penEnemy ; #line 2759 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2761 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penKiller == NULL || ! IsOfClass (penKiller , "Player")){ #line 2762 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penKiller = FixupCausedToPlayer (this , penKiller , FALSE ); #line 2763 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2766 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penKiller != NULL ){ #line 2768 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" EReceiveScore eScore ; #line 2769 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eScore . iPoints = m_iScore ; #line 2770 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penKiller -> SendEvent (eScore ); #line 2771 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(CountAsKill ()) #line 2772 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2773 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penKiller -> SendEvent (EKilledEnemy ()); #line 2774 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2776 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(GetSP () -> sp_bCooperative ){ #line 2777 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" EComputerMessage eMsg ; #line 2778 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eMsg . fnmMessage = GetComputerMessageName (); #line 2779 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(eMsg . fnmMessage != ""){ #line 2780 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penKiller -> SendEvent (eMsg ); #line 2781 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2782 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2783 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2787 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (EStop ()); #line 2788 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (EEnd ()); #line 2791 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendToTarget (m_penDeathTarget , m_eetDeathType , penKiller ); #line 2794 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penSpawnerTarget ){ #line 2795 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendToTarget (m_penSpawnerTarget , EET_TRIGGER , this ); #line 2796 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2800 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x01360053, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360053_Die_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360053 switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 2804 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(ShouldBlowUp ()){ #line 2806 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BlowUpBase (); #line 2808 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x01360054, FALSE, EInternal());return TRUE; #line 2810 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2812 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_DeathSequence, TRUE, EVoid());return TRUE; #line 2813 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2814 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&e= (EDamage&)__eeInput; #line 2818 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(ShouldBlowUp ()){ #line 2820 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BlowUpBase (); #line 2822 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x01360054, FALSE, EInternal());return TRUE; #line 2823 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2825 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2826 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EEnd):{const EEnd&e= (EEnd&)__eeInput; #line 2830 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" UnsetTimer();Jump(STATE_CURRENT,0x01360054, FALSE, EInternal());return TRUE; #line 2831 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 2832 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x01360054_Die_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360054 #line 2835 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" RemoveFromFuss (); #line 2837 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Destroy (); #line 2840 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EVoid()); #line 2840 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2843 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Death(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_Death ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::Death expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2845 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 2846 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" DeathSound (); #line 2847 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" LeaveStain (FALSE ); #line 2850 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetPhysicsFlags (EPF_MODEL_CORPSE ); #line 2851 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetCollisionFlags (ECF_CORPSE ); #line 2852 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetFlags (GetFlags () | ENF_SEETHROUGH ); #line 2855 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" RemoveFromFuss (); #line 2858 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" DeathNotify (); #line 2861 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" INDEX iAnim = AnimForDeath (); #line 2863 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vTacticsStartPosition = FLOAT3D (1 , 1 , 1); #line 2864 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar4 = WaitForDust (m_vTacticsStartPosition ); #line 2866 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar5 = _pTimer -> CurrentTick (); #line 2868 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar3 = - 1; #line 2870 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(!(m_fTacticVar4 < 0)){ Jump(STATE_CURRENT,0x0136005e, FALSE, EInternal());return TRUE;} #line 2872 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(GetAnimLength (iAnim )); Jump(STATE_CURRENT, 0x01360056, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360056_Death_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360056 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360057, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360057_Death_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360057 ;Jump(STATE_CURRENT,0x0136005d, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x0136005e_Death_09(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136005e if(!(TRUE )){ Jump(STATE_CURRENT,0x0136005c, FALSE, EInternal());return TRUE;} #line 2877 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT,0x0136005a, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x0136005a_Death_05(const CEntityEvent &__eeInput) #line 2878 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136005a if(!(_pTimer -> CurrentTick () < m_fTacticVar5 + GetCurrentAnimLength ())){ Jump(STATE_CURRENT,0x0136005b, FALSE, EInternal());return TRUE;} #line 2879 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(_pTimer -> TickQuantum ); Jump(STATE_CURRENT, 0x01360058, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360058_Death_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360058 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360059, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360059_Death_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360059 ; #line 2880 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(en_penReference != NULL && _pTimer -> CurrentTick () >= m_fTacticVar5 + m_fTacticVar4 && m_fTacticVar3 < 0) #line 2881 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2883 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPlacement3D plFX = GetPlacement (); #line 2884 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ESpawnEffect ese ; #line 2885 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . colMuliplier = C_WHITE | CT_OPAQUE ; #line 2886 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . vStretch = m_vTacticsStartPosition ; #line 2887 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . vNormal = FLOAT3D (0 , 1 , 0); #line 2888 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ese . betType = BET_DUST_FALL ; #line 2889 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CPlacement3D plSmoke = plFX ; #line 2890 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" plSmoke . pl_PositionVector += FLOAT3D (0 , 0.35f * m_vTacticsStartPosition (2) , 0); #line 2891 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penFX = CreateEntity (plSmoke , CLASS_BASIC_EFFECT ); #line 2892 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penFX -> Initialize (ese ); #line 2893 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penFX -> SetParent (this ); #line 2895 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fTacticVar3 = 1; #line 2896 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }Jump(STATE_CURRENT,0x0136005a, FALSE, EInternal());return TRUE; #line 2897 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }BOOL CEnemyBase::H0x0136005b_Death_06(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136005b Jump(STATE_CURRENT,0x0136005c, FALSE, EInternal());return TRUE;}BOOL CEnemyBase::H0x0136005c_Death_07(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136005c Jump(STATE_CURRENT,0x0136005d, FALSE, EInternal());return TRUE;} BOOL CEnemyBase::H0x0136005d_Death_08(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136005d #line 2900 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EEnd ()); #line 2900 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2903 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" DeathSequence(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_DeathSequence ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::DeathSequence expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2906 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_Death, TRUE; Jump(STATE_CURRENT, 0x01360060, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360060_DeathSequence_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360060 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_Death, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x01360061, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360061_DeathSequence_02(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x01360061 const EEnd&__e= (EEnd&)__eeInput; ; #line 2909 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" LeaveStain (TRUE ); #line 2912 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntityPointer penFlame = GetChildOfClass ("Flame"); #line 2913 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(penFlame != NULL ) #line 2914 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" { #line 2916 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" EStopFlaming esf ; #line 2917 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" esf . m_bNow = FALSE ; #line 2918 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" penFlame -> SendEvent (esf ); #line 2919 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2921 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(2.0f); Jump(STATE_CURRENT, 0x01360062, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360062_DeathSequence_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360062 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360063, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360063_DeathSequence_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360063 ; #line 2924 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fSpiritStartTime = _pTimer -> CurrentTick (); #line 2925 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fFadeStartTime = _pTimer -> CurrentTick (); #line 2926 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fFadeTime = 1.0f , #line 2927 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bFadeOut = TRUE ; #line 2929 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetCollisionFlags (ECF_CORPSE & ~ ((ECBI_PROJECTILE_MAGIC | ECBI_PROJECTILE_SOLID ) << ECB_TEST )); #line 2931 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(m_fFadeTime ); Jump(STATE_CURRENT, 0x01360064, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360064_DeathSequence_05(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360064 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360065, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360065_DeathSequence_06(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360065 ; #line 2933 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(6.0f); Jump(STATE_CURRENT, 0x01360066, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360066_DeathSequence_07(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360066 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360067, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360067_DeathSequence_08(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360067 ; #line 2935 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EEnd ()); #line 2935 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 2942 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Active(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_Active ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::Active expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 2944 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fDamageConfused = 0.0f; #line 2946 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x01360069, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360069_Active_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360069 switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 2950 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEvent (EReconsiderBehavior ()); #line 2951 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2952 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EReconsiderBehavior):{const EReconsiderBehavior&e= (EReconsiderBehavior&)__eeInput; #line 2956 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy != NULL ){ #line 2958 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_AttackEnemy, TRUE, EVoid());return TRUE; #line 2960 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_penMarker != NULL ){ #line 2962 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_MoveThroughMarkers, TRUE, EVoid());return TRUE; #line 2964 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else if(m_bOnStartPosition ){ #line 2966 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bOnStartPosition = FALSE ; #line 2967 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_BeIdle, TRUE, EVoid());return TRUE; #line 2969 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 2971 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_ReturnToStartPosition, TRUE, EVoid());return TRUE; #line 2972 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2973 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2974 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EReturn):{const EReturn&e= (EReturn&)__eeInput; #line 2978 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEvent (EReconsiderBehavior ()); #line 2979 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2980 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ERestartAttack):{const ERestartAttack&e= (ERestartAttack&)__eeInput; #line 2984 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEvent (EReconsiderBehavior ()); #line 2985 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2986 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EWatch):{const EWatch&eWatch= (EWatch&)__eeInput; #line 2990 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(SetTargetSoft (eWatch . penSeen )){ #line 2992 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bBlind && m_bTacticsStartOnSense ){ #line 2993 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StartTacticsNow (); #line 2994 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2996 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_NewEnemySpotted, TRUE, EVoid());return TRUE; #line 2997 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 2998 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 2999 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&eDamage= (EDamage&)__eeInput; #line 3003 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTargetHard (eDamage . penInflictor ); #line 3006 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fDamageConfused -= eDamage . fAmount ; #line 3007 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fDamageConfused < 0.001f){ #line 3008 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fDamageConfused = m_fDamageWounded ; #line 3010 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" WoundedNotify (eDamage ); #line 3012 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" WoundSound (); #line 3014 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_BeWounded, TRUE, eDamage );return TRUE; #line 3015 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3016 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3017 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EForceWound): #line 3019 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" {const EForceWound&e= (EForceWound&)__eeInput; #line 3020 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_BeWounded, TRUE, EDamage ());return TRUE; #line 3021 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3022 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ESound):{const ESound&eSound= (ESound&)__eeInput; #line 3026 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bDeaf ){ #line 3028 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3029 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3032 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsVisible (eSound . penTarget ) && SetTargetSoft (eSound . penTarget )){ #line 3034 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_NewEnemySpotted, TRUE, EVoid());return TRUE; #line 3035 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3036 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3037 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETouch):{const ETouch&eTouch= (ETouch&)__eeInput; #line 3041 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" BOOL bTargetChanged = SetTargetHard (eTouch . penOther ); #line 3043 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(bTargetChanged ){ #line 3045 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SightSound (); #line 3047 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEvent (EReconsiderBehavior ()); #line 3048 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3049 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return FALSE; #line 3050 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETrigger):{const ETrigger&eTrigger= (ETrigger&)__eeInput; #line 3053 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penCaused = FixupCausedToPlayer (this , eTrigger . penCaused ); #line 3055 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(SetTargetSoft (penCaused )){ #line 3057 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SightSound (); #line 3059 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SendEvent (EReconsiderBehavior ()); #line 3060 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3061 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3062 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EStop):{const EStop&e= (EStop&)__eeInput; #line 3065 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT, STATE_CEnemyBase_Inactive, TRUE, EVoid());return TRUE; #line 3066 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EStartAttack):{const EStartAttack&e= (EStartAttack&)__eeInput; #line 3071 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3072 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EStopAttack):{const EStopAttack&e= (EStopAttack&)__eeInput; #line 3075 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3076 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 3077 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x0136006a_Active_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136006a ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 3081 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Inactive(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_Inactive ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::Inactive expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 3084 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StopMoving (); #line 3085 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandingAnim (); #line 3087 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (EStart ()); #line 3089 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x0136006c, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x0136006c_Inactive_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x0136006c switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EStart):{const EStart&e= (EStart&)__eeInput; #line 3094 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT, STATE_CEnemyBase_Active, TRUE, EVoid());return TRUE; #line 3095 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EReturn):{const EReturn&e= (EReturn&)__eeInput; #line 3099 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT, STATE_CEnemyBase_Active, TRUE, EVoid());return TRUE; #line 3100 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETrigger):{const ETrigger&eTrigger= (ETrigger&)__eeInput; #line 3103 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEntity * penCaused = FixupCausedToPlayer (this , eTrigger . penCaused ); #line 3105 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(SetTargetSoft (penCaused )){ #line 3107 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT, STATE_CEnemyBase_Active, TRUE, EVoid());return TRUE; #line 3108 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3109 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EDamage):{const EDamage&eDamage= (EDamage&)__eeInput; #line 3113 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(SetTargetHard (eDamage . penInflictor )){ #line 3115 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" WoundedNotify (eDamage ); #line 3117 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" WoundSound (); #line 3119 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_BeWounded, TRUE, eDamage );return TRUE; #line 3120 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3121 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EVoid()); #line 3121 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3122 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 3123 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x0136006d_Inactive_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x0136006d ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 3127 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" PreMainLoop(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_PreMainLoop ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::PreMainLoop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 3129 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EReturn ()); #line 3129 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 3133 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" MainLoop(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_MainLoop ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::MainLoop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 3136 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SizeModel (); #line 3138 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_fMaxHealth == GetHealth () || IsOfClass (this , "Devil") || IsOfClass (this , "ExotechLarva") || IsOfClass (this , "AirElemental") || IsOfClass (this , "Summoner")); #line 3141 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_tmReflexMin < 0){ #line 3142 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmReflexMin = 0.0f; #line 3143 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3144 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_tmReflexMin > m_tmReflexMax ){ #line 3145 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_tmReflexMax = m_tmReflexMin ; #line 3146 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3149 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_fStepHeight == - 1){ #line 3150 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_fStepHeight = 2.0f; #line 3151 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3154 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_bTemplate ){ #line 3156 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EVoid()); #line 3156 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3157 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3166 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAfter(_pTimer -> TickQuantum ); Jump(STATE_CURRENT, 0x01360070, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360070_MainLoop_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360070 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01360071, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360071_MainLoop_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360071 ; #line 3169 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penWatcher = CreateEntity (GetPlacement () , CLASS_WATCHER ); #line 3170 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" EWatcherInit eInitWatcher ; #line 3171 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" eInitWatcher . penOwner = this ; #line 3172 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> Initialize (eInitWatcher ); #line 3175 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penMarker != NULL && IsOfClass (m_penMarker , "Enemy Marker")){ #line 3176 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" CEnemyMarker * pem = (CEnemyMarker *) & * m_penMarker ; #line 3177 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_penMarker = pem -> m_penTarget ; #line 3178 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3182 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_vStartPosition = GetPlacement () . pl_PositionVector ; #line 3185 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_soSound . Set3DParameters (80.0f , 5.0f , 1.0f , 1.0f); #line 3188 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" en_fStepUpHeight = m_fStepHeight + 0.01f; #line 3189 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" en_fStepDnHeight = m_fFallHeight + 0.01f; #line 3192 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" EnemyPostInit (); #line 3195 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" AdjustDifficulty (); #line 3198 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_fStopDistance >= 0); #line 3199 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_fCloseDistance >= 0); #line 3200 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_fAttackDistance > m_fCloseDistance ); #line 3201 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" ASSERT (m_fIgnoreRange > m_fAttackDistance ); #line 3203 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetPredictable (TRUE ); #line 3205 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" STATE_CEnemyBase_PreMainLoop, TRUE; Jump(STATE_CURRENT, 0x01360072, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360072_MainLoop_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360072 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CEnemyBase_PreMainLoop, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x01360073, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CEnemyBase::H0x01360073_MainLoop_04(const CEntityEvent &__eeInput){ #undef STATE_CURRENT #define STATE_CURRENT 0x01360073 const EReturn&__e= (EReturn&)__eeInput; ; #line 3207 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT, STATE_CEnemyBase_StandardBehavior, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 3210 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" StandardBehavior(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_StandardBehavior ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::StandardBehavior expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 3213 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x01360075, FALSE, EBegin());return TRUE;}BOOL CEnemyBase::H0x01360075_StandardBehavior_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x01360075 switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 3217 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(m_penEnemy != NULL ){ #line 3218 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_Active, TRUE, EVoid());return TRUE; #line 3219 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }else { #line 3220 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Call(STATE_CURRENT, STATE_CEnemyBase_Inactive, TRUE, EVoid());return TRUE; #line 3221 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3222 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&eDeath= (EDeath&)__eeInput; #line 3226 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Jump(STATE_CURRENT, STATE_CEnemyBase_Die, TRUE, eDeath );return TRUE; #line 3227 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETeleport):{const ETeleport&et= (ETeleport&)__eeInput; #line 3231 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" GetWatcher () -> SendEvent (et ); #line 3232 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3233 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EStopBlindness):{const EStopBlindness&e= (EStopBlindness&)__eeInput; #line 3237 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bBlind = FALSE ; #line 3238 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3239 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_EStopDeafness):{const EStopDeafness&e= (EStopDeafness&)__eeInput; #line 3243 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" m_bDeaf = FALSE ; #line 3244 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3245 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;case(EVENTCODE_ETouch):{const ETouch&eTouch= (ETouch&)__eeInput; #line 3248 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" IfTargetCrushed (eTouch . penOther , (FLOAT3D &) eTouch . plCollision ); #line 3249 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" if(IsOfClass (eTouch . penOther , "Bouncer")){ #line 3250 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" JumpFromBouncer (this , eTouch . penOther ); #line 3251 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" } #line 3252 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; #line 3253 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 3254 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" }return TRUE;}BOOL CEnemyBase::H0x01360076_StandardBehavior_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x01360076 ASSERT(FALSE); return TRUE;};BOOL CEnemyBase:: #line 3258 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Main(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnemyBase_Main ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyBase::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 3259 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" Return(STATE_CURRENT,EVoid()); #line 3259 "D:/SE1_GPL/Sources/EntitiesMP/EnemyBase.es" return TRUE; ASSERT(FALSE); return TRUE;};