mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
2210 lines
108 KiB
C++
2210 lines
108 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
|
|
#include "StdH.h"
|
|
#include "EntitiesMP/BackgroundViewer.h"
|
|
#include "EntitiesMP/WorldSettingsController.h"
|
|
#include "EntitiesMP/Common/PathFinding.h"
|
|
#include "EntitiesMP/NavigationMarker.h"
|
|
#include "ModelsMP/Enemies/ExotechLarva/ExotechLarva.h"
|
|
#include "ModelsMP/Enemies/ExotechLarva/Body.h"
|
|
#include "ModelsMP/Enemies/ExotechLarva/Arm.h"
|
|
#include "ModelsMP/Enemies/ExotechLarva/BackArms.h"
|
|
#include "ModelsMP/Enemies/ExotechLarva/Weapons/PlasmaGun.h"
|
|
|
|
#include <EntitiesMP/ExotechLarva.h>
|
|
#include <EntitiesMP/ExotechLarva_tables.h>
|
|
CEntityEvent *ELarvaArmDestroyed::MakeCopy(void) { CEntityEvent *peeCopy = new ELarvaArmDestroyed(*this); return peeCopy;}
|
|
ELarvaArmDestroyed::ELarvaArmDestroyed() : CEntityEvent(EVENTCODE_ELarvaArmDestroyed) {;
|
|
ClearToDefault(iArm);
|
|
};
|
|
CEntityEvent *ELarvaRechargePose::MakeCopy(void) { CEntityEvent *peeCopy = new ELarvaRechargePose(*this); return peeCopy;}
|
|
ELarvaRechargePose::ELarvaRechargePose() : CEntityEvent(EVENTCODE_ELarvaRechargePose) {;
|
|
ClearToDefault(bStart);
|
|
};
|
|
#line 39 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
|
|
// info structure
|
|
static EntityInfo eiExotechLarva = {
|
|
EIBT_FLESH, 9999999999.9f,
|
|
0.0f, -1.0f, 0.0f, // source (eyes)
|
|
0.0f, -1.5f, 0.0f, // target (body)
|
|
};
|
|
|
|
#define MF_MOVEZ (1L<<0)
|
|
|
|
#define LARVA_HANDLE_TRANSLATE 4.4f
|
|
#define FIREPOS_PLASMA_RIGHT FLOAT3D(+3.08f, -1.20f+LARVA_HANDLE_TRANSLATE, -0.16f)
|
|
#define FIREPOS_PLASMA_LEFT FLOAT3D(-3.08f, -1.20f+LARVA_HANDLE_TRANSLATE, -0.16f)
|
|
#define FIREPOS_LASER_RIGHT FLOAT3D(+2.31f, 0.16f+LARVA_HANDLE_TRANSLATE, -3.57f)
|
|
#define FIREPOS_LASER_LEFT FLOAT3D(-2.20f, 0.18f+LARVA_HANDLE_TRANSLATE, -3.57f)
|
|
#define FIREPOS_TAIL FLOAT3D( 0.00f, -2.64f+LARVA_HANDLE_TRANSLATE, -0.22f)
|
|
//#define FIREPOS_MOUTH FLOAT3D( 0.00f, -0.75f, -2.09f)
|
|
|
|
|
|
// PERCENT_RIGHTBLOW has to be greater then PERCENT_LEFTBLOW or some things
|
|
// won't work correctly
|
|
#define PERCENT_RIGHTBLOW 0.6666f
|
|
#define PERCENT_LEFTBLOW 0.3333f
|
|
|
|
#define ARM_LEFT (1L<<0)
|
|
#define ARM_RIGHT (1L<<1)
|
|
|
|
|
|
void CExotechLarva::SetDefaultProperties(void) {
|
|
m_penMarkerNew = NULL;
|
|
m_penMarkerOld = NULL;
|
|
m_fStopRadius = 25.0f;
|
|
m_fStretch = 2.5f;
|
|
m_fLarvaHealth = 20000.0f;
|
|
m_fRechargePerSecond = 100.0f;
|
|
m_ltTarget = LT_ENEMY ;
|
|
m_penFirstRechargeTarget = NULL;
|
|
m_bRechargedAtLeastOnce = FALSE ;
|
|
m_vFirePosLeftPlasmaRel = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_vFirePosRightPlasmaRel = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_vFirePosTailRel = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_vFirePosLeftLaserAbs = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_vFirePosRightLaserAbs = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_bLeftArmActive = TRUE ;
|
|
m_bRightArmActive = TRUE ;
|
|
m_iExplodingArm = 1;
|
|
m_fMaxRechargedHealth = 1.0f;
|
|
m_bExploding = FALSE ;
|
|
m_bActive = TRUE ;
|
|
m_bRechargePose = FALSE ;
|
|
m_bLaserActive = FALSE ;
|
|
m_bInitialMove = TRUE ;
|
|
m_penRecharger = NULL;
|
|
m_tmLastTargateChange = 0.0f;
|
|
m_plExpArmPos = CPlacement3D(FLOAT3D (0 , 0 , 0) , ANGLE3D (0 , 0 , 0));
|
|
m_aExpArmRot = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_plExpGunPos = CPlacement3D(FLOAT3D (0 , 0 , 0) , ANGLE3D (0 , 0 , 0));
|
|
m_aExpGunRot = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_vExpDamage = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_iExplosions = 0;
|
|
m_iRnd = 0;
|
|
m_bRecharging = FALSE ;
|
|
m_penDeathInflictor = NULL;
|
|
m_tmDontFireLaserBefore = 0.0f;
|
|
m_fMinimumLaserWait = 5.0f;
|
|
m_bRenderLeftLaser = FALSE ;
|
|
m_bRenderRightLaser = FALSE ;
|
|
m_vLeftLaserTarget = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_vRightLaserTarget = FLOAT3D(0.0f , 0.0f , 0.0f);
|
|
m_bInvulnerable = FALSE ;
|
|
m_penLeftArmDestroyTarget = NULL;
|
|
m_penRightArmDestroyTarget = NULL;
|
|
m_penDeathTarget = NULL;
|
|
m_soFire1.SetOwner(this);
|
|
m_soFire1.Stop_internal();
|
|
m_soFire2.SetOwner(this);
|
|
m_soFire2.Stop_internal();
|
|
m_soFire3.SetOwner(this);
|
|
m_soFire3.Stop_internal();
|
|
m_soVoice.SetOwner(this);
|
|
m_soVoice.Stop_internal();
|
|
m_soChirp.SetOwner(this);
|
|
m_soChirp.Stop_internal();
|
|
m_soLaser.SetOwner(this);
|
|
m_soLaser.Stop_internal();
|
|
CEnemyBase::SetDefaultProperties();
|
|
}
|
|
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BOOL CExotechLarva::IsTargetValid(SLONG slPropertyOffset,CEntity * penTarget)
|
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(slPropertyOffset == offsetof (CExotechLarva , m_penMarkerNew ))
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(IsOfClass (penTarget , "NavigationMarker")){return TRUE ;}
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else {return FALSE ;}
|
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(slPropertyOffset == offsetof (CExotechLarva , m_penRecharger ))
|
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(IsOfClass (penTarget , "ExotechLarvaCharger")){return TRUE ;}
|
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else {return FALSE ;}
|
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return CEntity :: IsTargetValid (slPropertyOffset , penTarget );
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BOOL CExotechLarva::DoSafetyChecks(void) {
|
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penMarkerNew == NULL ){
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
WarningMessage ("First ExotechLarva marker not set! Destroying Larva...\n");
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return FALSE ;
|
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penRecharger == NULL ){
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
WarningMessage ("ExotechLarva Recharger target not set! Destroying Larva...\n");
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return FALSE ;
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE ;
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::FindNewTarget() {
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penEnemy != NULL ){
|
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penEnemy -> GetFlags () & ENF_ALIVE && ! (m_penEnemy -> GetFlags () & ENF_DELETED )){
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return ;
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 226 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
INDEX ctMaxPlayers = GetMaxPlayers ();
|
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntity * penPlayer ;
|
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
for(INDEX i = 0;i < ctMaxPlayers ;i ++){
|
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penPlayer = GetPlayerEntity (i );
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(penPlayer != NULL && DistanceTo (this , penPlayer ) < 200.0f){
|
|
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(penPlayer != NULL && (penPlayer -> GetFlags () & ENF_ALIVE ) &&
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
! (penPlayer -> GetFlags () & ENF_DELETED )){
|
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penEnemy = penPlayer ;
|
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BOOL CExotechLarva::AnyPlayerCloserThen(FLOAT fDistance) {
|
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BOOL bClose = FALSE ;
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
INDEX ctMaxPlayers = GetMaxPlayers ();
|
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntity * penPlayer ;
|
|
#line 252 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
for(INDEX i = 0;i < ctMaxPlayers ;i ++){
|
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penPlayer = GetPlayerEntity (i );
|
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(penPlayer != NULL ){
|
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if((penPlayer -> GetFlags () & ENF_ALIVE ) &&
|
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
! (penPlayer -> GetFlags () & ENF_DELETED ) &&
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
DistanceTo (this , penPlayer ) < fDistance )
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
bClose = TRUE ;
|
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return bClose ;
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::PerhapsChangeTarget() {
|
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(! m_penEnemy ){return ;}
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_tmLastTargateChange + 5.0f < _pTimer -> CurrentTick ()){
|
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
MaybeSwitchToAnotherPlayer ();
|
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_tmLastTargateChange = _pTimer -> CurrentTick ();
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
class CWorldSettingsController * CExotechLarva::GetWSC(void)
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CWorldSettingsController * pwsc = NULL ;
|
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CBackgroundViewer * penBcgViewer = (CBackgroundViewer *) GetWorld () -> GetBackgroundViewer ();
|
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(penBcgViewer != NULL ){
|
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc = (CWorldSettingsController *) & * penBcgViewer -> m_penWorldSettingsController ;
|
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return pwsc ;
|
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::ShakeItBaby(FLOAT tmShaketime,FLOAT fPower,BOOL bFadeIn)
|
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CWorldSettingsController * pwsc = GetWSC ();
|
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(pwsc != NULL ){
|
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_tmShakeStarted = tmShaketime ;
|
|
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_vShakePos = GetPlacement () . pl_PositionVector ;
|
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_fShakeFalloff = 450.0f;
|
|
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_fShakeFade = 3.0f;
|
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_fShakeIntensityZ = 0;
|
|
#line 299 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_tmShakeFrequencyZ = 5.0f;
|
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_fShakeIntensityY = 0.1f * fPower ;
|
|
#line 301 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_tmShakeFrequencyY = 5.0f;
|
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_fShakeIntensityB = 2.5f * fPower ;
|
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_tmShakeFrequencyB = 7.2f;
|
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pwsc -> m_bShakeFadeIn = bFadeIn ;
|
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::ShootTailProjectile(void) {
|
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penEnemy == NULL ){return ;}
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
EntityInfo * peiTarget = (EntityInfo *) (m_penEnemy -> GetEntityInfo ());
|
|
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vShootTarget ;
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetEntityInfoPosition (m_penEnemy , peiTarget -> vTargetCenter , vShootTarget );
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D pl ;
|
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PreparePropelledProjectile (pl , vShootTarget , m_vFirePosTailRel , ANGLE3D (0 , - 10 , 0));
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penProjectile = CreateEntity (pl , CLASS_LARVAOFFSPRING );
|
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ELaunchLarvaOffspring ello ;
|
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ello . penLauncher = this ;
|
|
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penProjectile -> Initialize (ello );
|
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BOOL CExotechLarva::IsOnMarker(CEntity * penMarker) {
|
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(penMarker == NULL ){return FALSE ;}
|
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(DistanceTo (this , penMarker ) < 0.1f){return TRUE ;}
|
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return FALSE ;
|
|
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT CExotechLarva::DistanceXZ(CEntity * E1,CEntity * E2)
|
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vE1pos = E1 -> GetPlacement () . pl_PositionVector ;
|
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vE2pos = E2 -> GetPlacement () . pl_PositionVector ;
|
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vE1pos (2) = 0.0f;
|
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vE2pos (2) = 0.0f;
|
|
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return (vE2pos - vE1pos ) . Length ();
|
|
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::SpawnWingDebris()
|
|
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vTranslation = m_vExpDamage + en_vCurrentTranslationAbsolute ;
|
|
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Begin (EIBT_FLESH , DPT_BLOODTRAIL , BET_BLOODSTAIN , 1.0f , m_vExpDamage , en_vCurrentTranslationAbsolute , 5.0f , 2.0f);
|
|
#line 349 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Spawn_Independent (this , this , MODEL_WING , TEXTURE_WING , 0 , 0 , 0 , 0 , m_fStretch ,
|
|
#line 350 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpArmPos , vTranslation , m_aExpArmRot );
|
|
#line 351 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vTranslation += FLOAT3D (FRnd () * 4.0f - 2.0f , FRnd () * 4.0f - 2.0f , FRnd () * 4.0f - 2.0f);
|
|
#line 352 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Spawn_Independent (this , this , MODEL_PLASMAGUN , TEXTURE_PLASMAGUN , 0 , 0 , 0 , 0 , m_fStretch ,
|
|
#line 353 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpGunPos , vTranslation , m_aExpGunRot );
|
|
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 357 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
|
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
|
#line 359 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 361 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bInvulnerable ){
|
|
#line 362 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return ;
|
|
#line 363 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 366 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(IsOfClass (penInflictor , "ExotechLarva")){
|
|
#line 367 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return ;
|
|
#line 368 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 372 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(dmtType == DMT_BULLET && fDamageAmmount > 100.0f)
|
|
#line 373 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 374 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount *= 0.66f;
|
|
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(dmtType == DMT_CANNONBALL )
|
|
#line 378 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 379 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount *= 0.5f;
|
|
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT fHealthNow = GetHealth ();
|
|
#line 385 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT fHealthAfter = GetHealth () - fDamageAmmount ;
|
|
#line 386 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT fHealthBlow01 = m_fMaxHealth * PERCENT_RIGHTBLOW ;
|
|
#line 387 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT fHealthBlow02 = m_fMaxHealth * PERCENT_LEFTBLOW ;
|
|
#line 390 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount *= DamageStrength (((EntityInfo *) GetEntityInfo ()) -> Eeibt , dmtType );
|
|
#line 392 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount *= GetGameDamageMultiplier ();
|
|
#line 395 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(fHealthNow > fHealthBlow01 && fHealthAfter < fHealthBlow02 ){
|
|
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount = fHealthNow - fHealthBlow01 - 1;
|
|
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(m_bExploding ){
|
|
#line 399 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(fHealthNow > fHealthBlow02 && fHealthAfter < fHealthBlow02 ){
|
|
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount = fHealthNow - fHealthBlow02 - 1;
|
|
#line 402 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(fHealthAfter < 0.0f){
|
|
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount = fHealthNow - 1;
|
|
#line 404 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 405 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(fHealthNow > fHealthBlow02 && fHealthAfter < 0){
|
|
#line 406 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
fDamageAmmount = fHealthNow - 1;
|
|
#line 407 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 410 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(fDamageAmmount == 0){
|
|
#line 412 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return ;
|
|
#line 413 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 416 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D plSpray = CPlacement3D (vHitPoint , ANGLE3D (0 , 0 , 0));
|
|
#line 417 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penSpray = CreateEntity (plSpray , CLASS_BLOOD_SPRAY );
|
|
#line 418 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnSpray eSpawnSpray ;
|
|
#line 419 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . colBurnColor = C_WHITE | CT_OPAQUE ;
|
|
#line 420 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_fMaxDamageAmmount > 10.0f)
|
|
#line 421 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 422 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . fDamagePower = 3.0f;
|
|
#line 423 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 424 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else if(m_fSprayDamage + fDamageAmmount > 50.0f)
|
|
#line 425 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 426 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . fDamagePower = 2.0f;
|
|
#line 427 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 428 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else
|
|
#line 429 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 430 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . fDamagePower = 1.0f;
|
|
#line 431 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 432 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
switch(IRnd () % 4){
|
|
#line 433 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
case 0: case 1: case 2:
|
|
#line 435 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penSpray -> SetParent (this );
|
|
#line 436 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . sptType = SPT_BLOOD ;
|
|
#line 437 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
break ;
|
|
#line 438 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
case 3:
|
|
#line 440 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . sptType = SPT_ELECTRICITY_SPARKS ;
|
|
#line 441 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
break ;
|
|
#line 442 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 443 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . fSizeMultiplier = 1.0f;
|
|
#line 445 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vHitPointRelative = vHitPoint - GetPlacement () . pl_PositionVector ;
|
|
#line 446 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vReflectingNormal ;
|
|
#line 447 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetNormalComponent (vHitPointRelative , en_vGravityDir , vReflectingNormal );
|
|
#line 448 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vReflectingNormal . Normalize ();
|
|
#line 450 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vReflectingNormal (1) /= 5.0f;
|
|
#line 452 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vProjectedComponent = vReflectingNormal * (vDirection % vReflectingNormal );
|
|
#line 453 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vSpilDirection = vDirection - vProjectedComponent * 2.0f - en_vGravityDir * 0.5f;
|
|
#line 455 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . vDirection = vSpilDirection ;
|
|
#line 456 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnSpray . penOwner = this ;
|
|
#line 459 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penSpray -> Initialize (eSpawnSpray );
|
|
#line 460 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_tmSpraySpawned = _pTimer -> CurrentTick ();
|
|
#line 461 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fSprayDamage = 0.0f;
|
|
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fMaxDamageAmmount = 0.0f;
|
|
#line 470 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
en_fHealth -= fDamageAmmount ;
|
|
#line 472 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(en_fHealth <= 0){
|
|
#line 474 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
EDeath eDeath ;
|
|
#line 475 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (eDeath );
|
|
#line 476 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 478 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRightArmActive ){
|
|
#line 479 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(GetHealth () < m_fMaxHealth * PERCENT_RIGHTBLOW ){
|
|
#line 480 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ELarvaArmDestroyed ead ;
|
|
#line 481 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ead . iArm = ARM_RIGHT ;
|
|
#line 482 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (ead );
|
|
#line 483 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bExploding = TRUE ;
|
|
#line 484 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 485 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 486 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bLeftArmActive ){
|
|
#line 487 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(GetHealth () < m_fMaxHealth * PERCENT_LEFTBLOW ){
|
|
#line 488 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ELarvaArmDestroyed ead ;
|
|
#line 489 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ead . iArm = ARM_LEFT ;
|
|
#line 490 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (ead );
|
|
#line 491 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bExploding = TRUE ;
|
|
#line 492 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 493 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 496 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_colBurning = COLOR (C_WHITE | CT_OPAQUE );
|
|
#line 498 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
CTString CExotechLarva::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath) {
|
|
#line 501 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CTString str ;
|
|
#line 502 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
str . PrintF (TRANS ("Exotech larva reduced %s to pulp.") , strPlayerName );
|
|
#line 503 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return str ;
|
|
#line 504 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 507 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void * CExotechLarva::GetEntityInfo(void) {
|
|
#line 508 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return & eiExotechLarva ;
|
|
#line 509 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
const CTFileName & CExotechLarva::GetComputerMessageName(void)const {
|
|
#line 512 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
static DECLARE_CTFILENAME (fnmLarva , "DataMP\\Messages\\Enemies\\ExotechLarva.txt");
|
|
#line 513 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return fnmLarva ;
|
|
#line 514 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 516 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::Precache(void) {
|
|
#line 517 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEnemyBase :: Precache ();
|
|
#line 519 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheClass (CLASS_BASIC_EFFECT , BET_ROCKET );
|
|
#line 520 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheClass (CLASS_BASIC_EFFECT , BET_CANNON );
|
|
#line 521 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheClass (CLASS_BLOOD_SPRAY );
|
|
#line 522 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheClass (CLASS_PROJECTILE , PRT_LARVA_TAIL_PROJECTILE );
|
|
#line 523 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheClass (CLASS_PROJECTILE , PRT_LARVA_PLASMA );
|
|
#line 525 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_EXOTECHLARVA );
|
|
#line 526 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_EXOTECHLARVA );
|
|
#line 527 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_BODY );
|
|
#line 528 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_BODY );
|
|
#line 529 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_BEAM );
|
|
#line 530 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_BEAM );
|
|
#line 531 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_ENERGYBEAMS );
|
|
#line 532 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_ENERGYBEAMS );
|
|
#line 533 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_FLARE );
|
|
#line 534 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_FLARE );
|
|
#line 535 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_WING );
|
|
#line 536 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_WING );
|
|
#line 537 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_PLASMAGUN );
|
|
#line 538 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_PLASMAGUN );
|
|
#line 540 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_BLADES );
|
|
#line 541 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_DEBRIS_BODY );
|
|
#line 542 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_DEBRIS_TAIL01 );
|
|
#line 543 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_DEBRIS_TAIL02 );
|
|
#line 545 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_DEBRIS_FLESH );
|
|
#line 546 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_DEBRIS_FLESH );
|
|
#line 547 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_PLASMA );
|
|
#line 548 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_PLASMA );
|
|
#line 549 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheModel (MODEL_BODY );
|
|
#line 550 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheTexture (TEXTURE_BODY );
|
|
#line 552 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheSound (SOUND_FIRE_PLASMA );
|
|
#line 553 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheSound (SOUND_FIRE_TAIL );
|
|
#line 554 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheSound (SOUND_LASER_CHARGE );
|
|
#line 555 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheSound (SOUND_DEATH );
|
|
#line 556 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheSound (SOUND_ARMDESTROY );
|
|
#line 557 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheSound (SOUND_CHIRP );
|
|
#line 558 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PrecacheSound (SOUND_DEPLOYLASER );
|
|
#line 560 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 563 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject * CExotechLarva::PlasmaLeftModel(void) {
|
|
#line 564 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CAttachmentModelObject * amo = GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_LEFT );
|
|
#line 565 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo = amo -> amo_moModelObject . GetAttachmentModel (ARM_ATTACHMENT_PLASMAGUN );
|
|
#line 566 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return & (amo -> amo_moModelObject );
|
|
#line 567 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 568 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject * CExotechLarva::PlasmaRightModel(void) {
|
|
#line 569 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CAttachmentModelObject * amo = GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_RIGHT );
|
|
#line 570 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo = amo -> amo_moModelObject . GetAttachmentModel (ARM_ATTACHMENT_PLASMAGUN );
|
|
#line 571 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return & (amo -> amo_moModelObject );
|
|
#line 572 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 574 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BOOL CExotechLarva::RechargerActive() {
|
|
#line 575 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(((CExotechLarvaCharger *) & * m_penRecharger ) -> m_bActive ){
|
|
#line 576 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE ;
|
|
#line 577 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 578 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return FALSE ;
|
|
#line 579 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 641 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::RemoveWing(INDEX iArm) {
|
|
#line 643 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(iArm == ARM_RIGHT ){
|
|
#line 644 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
RemoveAttachmentFromModel (* GetModelObject () , BODY_ATTACHMENT_ARM_RIGHT );
|
|
#line 645 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 647 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(iArm == ARM_LEFT ){
|
|
#line 648 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
RemoveAttachmentFromModel (* GetModelObject () , BODY_ATTACHMENT_ARM_LEFT );
|
|
#line 649 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 650 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 652 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE CExotechLarva::GetArmsPitch(void) {
|
|
#line 653 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bLeftArmActive ){
|
|
#line 654 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CAttachmentModelObject & amo = * GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_LEFT );
|
|
#line 655 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return (amo . amo_plRelative . pl_OrientationAngle (2) + GetPlacement () . pl_OrientationAngle (2));
|
|
#line 656 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 657 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return 0.0f;
|
|
#line 658 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 660 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ULONG CExotechLarva::SetDesiredMovement(void)
|
|
#line 661 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 662 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ULONG ulFlags = 0;
|
|
#line 663 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vPos ;
|
|
#line 664 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntity * penMarker = m_penMarkerNew ;
|
|
#line 665 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntity * penTarget ;
|
|
#line 667 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_ltTarget == LT_ENEMY && m_penEnemy ){penTarget = m_penEnemy ;}
|
|
#line 668 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else if(m_ltTarget == LT_RECHARGER ){penTarget = m_penRecharger ;}
|
|
#line 669 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else {return ulFlags ;}
|
|
#line 673 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(IsOnMarker (m_penMarkerNew )){
|
|
#line 674 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PATH_FindNextMarker (penTarget , GetPlacement () . pl_PositionVector ,
|
|
#line 675 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penTarget -> GetPlacement () . pl_PositionVector , penMarker , vPos );
|
|
#line 676 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(penMarker != NULL ){
|
|
#line 678 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penMarkerOld = m_penMarkerNew ;
|
|
#line 680 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penMarkerNew = penMarker ;
|
|
#line 681 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 682 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
MoveToMarker (m_penMarkerNew );
|
|
#line 683 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ulFlags |= MF_MOVEZ ;
|
|
#line 684 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else {
|
|
#line 685 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
MoveToMarker (m_penMarkerNew );
|
|
#line 686 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ulFlags |= MF_MOVEZ ;
|
|
#line 687 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 689 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_ltTarget == LT_ENEMY && DistanceTo (this , penTarget ) < m_fStopRadius ){
|
|
#line 690 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ForceFullStop ();
|
|
#line 691 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 693 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return ulFlags ;
|
|
#line 694 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 696 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::MoveToMarker(CEntity * penMarker) {
|
|
#line 697 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(penMarker == NULL ){return ;}
|
|
#line 698 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vDesiredDir = penMarker -> GetPlacement () . pl_PositionVector -
|
|
#line 699 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetPlacement () . pl_PositionVector ;
|
|
#line 700 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(vDesiredDir . Length () > 0.0f){
|
|
#line 701 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vDesiredDir . Normalize ();
|
|
#line 702 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vSpeed = vDesiredDir * m_fAttackRunSpeed ;
|
|
#line 703 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetDesiredTranslation (vSpeed );
|
|
#line 704 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 705 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 708 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::PreMoving() {
|
|
#line 710 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bActive && ! m_bRenderLeftLaser && ! m_bRenderRightLaser ){
|
|
#line 713 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penEnemy != NULL ){
|
|
#line 715 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vToEnemy ;
|
|
#line 716 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vToEnemy = (m_penEnemy -> GetPlacement () . pl_PositionVector -
|
|
#line 717 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetPlacement () . pl_PositionVector ) . Normalize ();
|
|
#line 718 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE3D aAngle ;
|
|
#line 719 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
DirectionVectorToAngles (vToEnemy , aAngle );
|
|
#line 720 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
aAngle (1) = aAngle (1) - GetPlacement () . pl_OrientationAngle (1);
|
|
#line 721 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
aAngle (1) = NormalizeAngle (aAngle (1));
|
|
#line 722 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetDesiredRotation (FLOAT3D (aAngle (1) * 2.0f , 0.0f , 0.0f));
|
|
#line 723 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else {
|
|
#line 724 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetDesiredRotation (FLOAT3D (0.0f , 0.0f , 0.0f));
|
|
#line 725 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 728 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(en_vCurrentTranslationAbsolute . Length () * _pTimer -> TickQuantum * 2.0f >
|
|
#line 729 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
DistanceTo (this , m_penMarkerNew )){
|
|
#line 730 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vToMarker = m_penMarkerNew -> GetPlacement () . pl_PositionVector -
|
|
#line 731 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetPlacement () . pl_PositionVector ;
|
|
#line 732 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetDesiredTranslation (vToMarker / _pTimer -> TickQuantum );
|
|
#line 733 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 736 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(IsOnMarker (m_penMarkerNew )){
|
|
#line 737 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ForceStopTranslation ();
|
|
#line 738 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 739 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else {
|
|
#line 740 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ForceFullStop ();
|
|
#line 741 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 743 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEnemyBase :: PreMoving ();
|
|
#line 744 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 746 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::RenderParticles(void)
|
|
#line 747 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 749 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOATmatrix3D m ;
|
|
#line 750 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D plLarva ;
|
|
#line 752 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRenderLeftLaser || m_bRenderRightLaser ){
|
|
#line 753 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plLarva = GetLerpedPlacement ();
|
|
#line 754 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
MakeRotationMatrix (m , plLarva . pl_OrientationAngle );
|
|
#line 755 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 757 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRenderLeftLaser ){
|
|
#line 758 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vSource = (FIREPOS_LASER_LEFT * m_fStretch ) * m + plLarva . pl_PositionVector ;
|
|
#line 759 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Particles_ExotechLarvaLaser (this , vSource , m_vLeftLaserTarget );
|
|
#line 760 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 761 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRenderRightLaser ){
|
|
#line 762 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vSource = (FIREPOS_LASER_RIGHT * m_fStretch ) * m + plLarva . pl_PositionVector ;
|
|
#line 763 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Particles_ExotechLarvaLaser (this , vSource , m_vRightLaserTarget );
|
|
#line 764 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 765 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRechargePose && ((CExotechLarvaCharger *) & * m_penRecharger ) -> m_bBeamActive )
|
|
#line 766 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 767 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Particles_LarvaEnergy (this , FLOAT3D (0.0f , LARVA_HANDLE_TRANSLATE , 0.0f) * m_fStretch );
|
|
#line 768 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 769 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 771 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::SizeModel(void)
|
|
#line 772 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 773 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return ;
|
|
#line 774 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 776 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::UpdateFiringPos() {
|
|
#line 777 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vFirePosLeftLaserAbs = (FIREPOS_LASER_LEFT * m_fStretch ) * GetRotationMatrix () + GetPlacement () . pl_PositionVector ;
|
|
#line 778 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vFirePosRightLaserAbs = (FIREPOS_LASER_RIGHT * m_fStretch ) * GetRotationMatrix () + GetPlacement () . pl_PositionVector ;
|
|
#line 779 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 781 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::BlowUp(void)
|
|
#line 782 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 783 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
NOTHING ;
|
|
#line 784 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 787 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::EnemyPostInit(void)
|
|
#line 788 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 789 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_soFire1 . Set3DParameters (600.0f , 150.0f , 2.0f , 1.0f);
|
|
#line 790 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_soFire2 . Set3DParameters (600.0f , 150.0f , 2.0f , 1.0f);
|
|
#line 791 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_soFire3 . Set3DParameters (600.0f , 150.0f , 2.0f , 1.0f);
|
|
#line 792 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_soVoice . Set3DParameters (600.0f , 150.0f , 2.0f , 1.0f);
|
|
#line 793 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_soChirp . Set3DParameters (150.0f , 50.0f , 2.0f , 1.0f);
|
|
#line 794 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_soLaser . Set3DParameters (300.0f , 200.0f , 3.0f , 1.0f);
|
|
#line 795 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 797 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::FireLaser(void)
|
|
#line 798 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 800 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vLaserTarget ;
|
|
#line 802 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(! m_penEnemy ){return ;}
|
|
#line 804 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(IsVisible (m_penEnemy )){
|
|
#line 805 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vLaserTarget = m_penEnemy -> GetPlacement () . pl_PositionVector ;
|
|
#line 806 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(TRUE ){
|
|
#line 807 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vLaserTarget = m_vPlayerSpotted ;
|
|
#line 808 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 811 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CCastRay crRay1 (this , m_vFirePosLeftLaserAbs , vLaserTarget );
|
|
#line 812 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay1 . cr_fTestR = 0.10f;
|
|
#line 813 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay1 . cr_bHitTranslucentPortals = FALSE ;
|
|
#line 814 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay1 . cr_bPhysical = FALSE ;
|
|
#line 815 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay1 . cr_ttHitModels = CCastRay :: TT_COLLISIONBOX ;
|
|
#line 816 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetWorld () -> CastRay (crRay1 );
|
|
#line 819 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(crRay1 . cr_penHit != NULL ){
|
|
#line 820 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRenderLeftLaser = TRUE ;
|
|
#line 821 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vLeftLaserTarget = crRay1 . cr_vHit ;
|
|
#line 824 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
InflictDirectDamage (crRay1 . cr_penHit , this , DMT_BURNING , 25.0f ,
|
|
#line 825 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D (0 , 0 , 0) , (m_vFirePosLeftLaserAbs - m_vLeftLaserTarget ) . Normalize ());
|
|
#line 827 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(crRay1 . cr_penHit -> GetRenderType () != RT_BRUSH ){
|
|
#line 828 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay1 . cr_ttHitModels = CCastRay :: TT_NONE ;
|
|
#line 829 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetWorld () -> ContinueCast (crRay1 );
|
|
#line 830 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(crRay1 . cr_penHit != NULL ){
|
|
#line 831 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vLeftLaserTarget = crRay1 . cr_vHit ;
|
|
#line 832 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 833 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 834 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(TRUE ){
|
|
#line 835 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRenderLeftLaser = FALSE ;
|
|
#line 836 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 839 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CCastRay crRay2 (this , m_vFirePosRightLaserAbs , vLaserTarget );
|
|
#line 840 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay2 . cr_fTestR = 0.10f;
|
|
#line 841 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay2 . cr_bHitTranslucentPortals = FALSE ;
|
|
#line 842 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay2 . cr_bPhysical = FALSE ;
|
|
#line 843 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay2 . cr_ttHitModels = CCastRay :: TT_COLLISIONBOX ;
|
|
#line 844 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetWorld () -> CastRay (crRay2 );
|
|
#line 847 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(crRay2 . cr_penHit != NULL ){
|
|
#line 848 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRenderRightLaser = TRUE ;
|
|
#line 849 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vRightLaserTarget = crRay2 . cr_vHit ;
|
|
#line 852 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
InflictDirectDamage (crRay2 . cr_penHit , this , DMT_BURNING , 25.0f ,
|
|
#line 853 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D (0 , 0 , 0) , (m_vFirePosRightLaserAbs - m_vRightLaserTarget ) . Normalize ());
|
|
#line 855 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(crRay2 . cr_penHit -> GetRenderType () != RT_BRUSH ){
|
|
#line 856 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
crRay2 . cr_ttHitModels = CCastRay :: TT_NONE ;
|
|
#line 857 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetWorld () -> ContinueCast (crRay2 );
|
|
#line 858 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(crRay2 . cr_penHit != NULL ){
|
|
#line 859 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vRightLaserTarget = crRay2 . cr_vHit ;
|
|
#line 860 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 861 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 862 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(TRUE ){
|
|
#line 863 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRenderRightLaser = FALSE ;
|
|
#line 864 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 865 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
|
|
#line 867 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
void CExotechLarva::ExplodeLaser(void)
|
|
#line 868 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 869 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRenderLeftLaser ){
|
|
#line 870 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 871 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 872 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 873 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (m_fStretch * 0.5 , m_fStretch * 0.5 , m_fStretch * 0.5);
|
|
#line 874 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penExplosion = CreateEntity (CPlacement3D (m_vLeftLaserTarget ,
|
|
#line 875 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE3D (0.0f , 0.0f , 0.0f)) , CLASS_BASIC_EFFECT );
|
|
#line 876 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 879 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_EXPLOSION_DEBRIS ;
|
|
#line 880 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (CPlacement3D (m_vLeftLaserTarget ,
|
|
#line 881 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE3D (0.0f , 0.0f , 0.0f)) , CLASS_BASIC_EFFECT );
|
|
#line 882 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 885 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_EXPLOSION_SMOKE ;
|
|
#line 886 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (CPlacement3D (m_vLeftLaserTarget ,
|
|
#line 887 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE3D (0.0f , 0.0f , 0.0f)) , CLASS_BASIC_EFFECT );
|
|
#line 888 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 890 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
InflictRangeDamage (this , DMT_EXPLOSION , 25.0f ,
|
|
#line 891 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vLeftLaserTarget , 5.0f , 25.0f);
|
|
#line 892 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 894 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRenderRightLaser ){
|
|
#line 895 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 896 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 897 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 898 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (m_fStretch * 0.5 , m_fStretch * 0.5 , m_fStretch * 0.5);
|
|
#line 899 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penExplosion = CreateEntity (CPlacement3D (m_vLeftLaserTarget ,
|
|
#line 900 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE3D (0.0f , 0.0f , 0.0f)) , CLASS_BASIC_EFFECT );
|
|
#line 901 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 904 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_EXPLOSION_DEBRIS ;
|
|
#line 905 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (CPlacement3D (m_vLeftLaserTarget ,
|
|
#line 906 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE3D (0.0f , 0.0f , 0.0f)) , CLASS_BASIC_EFFECT );
|
|
#line 907 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 910 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_EXPLOSION_SMOKE ;
|
|
#line 911 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (CPlacement3D (m_vLeftLaserTarget ,
|
|
#line 912 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ANGLE3D (0.0f , 0.0f , 0.0f)) , CLASS_BASIC_EFFECT );
|
|
#line 913 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 915 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
InflictRangeDamage (this , DMT_EXPLOSION , 25.0f ,
|
|
#line 916 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vLeftLaserTarget , 5.0f , 25.0f);
|
|
#line 917 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 918 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
BOOL CExotechLarva::
|
|
#line 928 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BeWounded(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_BeWounded
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDamage, "CExotechLarva::BeWounded expects 'EDamage' as input!"); const EDamage &eDamage = (const EDamage &)__eeInput;
|
|
#line 929 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 929 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CExotechLarva::
|
|
#line 932 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ArmExplosion(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_ArmExplosion
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarva::ArmExplosion expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 934 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOATmatrix3D mRot ;
|
|
#line 935 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vPos ;
|
|
#line 937 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bActive = FALSE ;
|
|
#line 940 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iExplodingArm == ARM_RIGHT ){
|
|
#line 941 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
MakeRotationMatrixFast (mRot , ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 942 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vPos = FLOAT3D (0.0f , 0.0f , 0.0f);
|
|
#line 943 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetModelForRendering () -> GetAttachmentTransformations (BODY_ATTACHMENT_ARM_RIGHT , mRot , vPos , FALSE );
|
|
#line 944 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpArmPos . pl_PositionVector = vPos * GetRotationMatrix () + GetPlacement () . pl_PositionVector ;
|
|
#line 945 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpArmPos . pl_OrientationAngle = GetPlacement () . pl_OrientationAngle ;
|
|
#line 946 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CAttachmentModelObject & amo0 = * GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_RIGHT );
|
|
#line 947 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo0 . amo_moModelObject . GetAttachmentTransformations (ARM_ATTACHMENT_PLASMAGUN , mRot , vPos , FALSE );
|
|
#line 948 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpGunPos . pl_PositionVector = vPos * GetRotationMatrix () + GetPlacement () . pl_PositionVector ;
|
|
#line 949 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpGunPos . pl_OrientationAngle = GetPlacement () . pl_OrientationAngle ;
|
|
#line 950 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vExpDamage = FLOAT3D (+ 12.0f , 15.0f , 0.0f);
|
|
#line 952 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penLeftArmDestroyTarget ){
|
|
#line 953 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendToTarget (m_penLeftArmDestroyTarget , EET_TRIGGER , FixupCausedToPlayer (this , m_penEnemy ));
|
|
#line 954 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 955 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 958 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iExplodingArm == ARM_LEFT ){
|
|
#line 959 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
MakeRotationMatrixFast (mRot , ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 960 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vPos = FLOAT3D (0.0f , 0.0f , 0.0f);
|
|
#line 961 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetModelForRendering () -> GetAttachmentTransformations (BODY_ATTACHMENT_ARM_LEFT , mRot , vPos , FALSE );
|
|
#line 962 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpArmPos . pl_PositionVector = vPos * GetRotationMatrix () + GetPlacement () . pl_PositionVector ;
|
|
#line 963 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpArmPos . pl_OrientationAngle = GetPlacement () . pl_OrientationAngle ;
|
|
#line 964 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpArmPos . pl_OrientationAngle (1) += 180.0f;
|
|
#line 965 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CAttachmentModelObject & amo0 = * GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_LEFT );
|
|
#line 966 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo0 . amo_moModelObject . GetAttachmentTransformations (ARM_ATTACHMENT_PLASMAGUN , mRot , vPos , FALSE );
|
|
#line 967 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpGunPos . pl_PositionVector = vPos * GetRotationMatrix () + GetPlacement () . pl_PositionVector ;
|
|
#line 968 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_plExpGunPos . pl_OrientationAngle = GetPlacement () . pl_OrientationAngle ;
|
|
#line 969 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vExpDamage = FLOAT3D (- 12.0f , 15.0f , 0.0f);
|
|
#line 971 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penRightArmDestroyTarget ){
|
|
#line 972 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendToTarget (m_penRightArmDestroyTarget , EET_TRIGGER , FixupCausedToPlayer (this , m_penEnemy ));
|
|
#line 973 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 974 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 975 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_aExpArmRot = ANGLE3D (FRnd () * 360.0f - 180.0f , FRnd () * 360.0f - 180.0f , FRnd () * 360.0f - 180.0f);
|
|
#line 976 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_aExpGunRot = ANGLE3D (FRnd () * 360.0f - 180.0f , FRnd () * 360.0f - 180.0f , FRnd () * 360.0f - 180.0f);
|
|
#line 977 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vExpDamage = m_vExpDamage * GetRotationMatrix ();
|
|
#line 979 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iExplodingArm == ARM_RIGHT ){m_bRightArmActive = FALSE ;}
|
|
#line 980 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iExplodingArm == ARM_LEFT ){m_bLeftArmActive = FALSE ;}
|
|
#line 982 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soVoice , SOUND_ARMDESTROY , SOF_3D );
|
|
#line 984 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D pl = GetPlacement ();
|
|
#line 985 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pl . pl_PositionVector += FLOAT3D (0.0f , LARVA_HANDLE_TRANSLATE , 0.0f);
|
|
#line 986 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShakeItBaby (_pTimer -> CurrentTick () , 0.5f , FALSE );
|
|
#line 987 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 988 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 989 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 990 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (m_fStretch * 0.5 , m_fStretch * 0.5 , m_fStretch * 0.5);
|
|
#line 991 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penExplosion = CreateEntity (pl , CLASS_BASIC_EFFECT );
|
|
#line 992 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 993 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(FRnd () * 0.25f + 0.15f);
|
|
Jump(STATE_CURRENT, 0x015a0004, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0004_ArmExplosion_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0004
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0005, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0005_ArmExplosion_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0005
|
|
;
|
|
#line 995 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShakeItBaby (_pTimer -> CurrentTick () , 0.5f , FALSE );
|
|
#line 996 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 997 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 998 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 999 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (m_fStretch , m_fStretch , m_fStretch );
|
|
#line 1000 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D plMiddle ;
|
|
#line 1001 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plMiddle . pl_PositionVector = (m_plExpArmPos . pl_PositionVector + m_plExpGunPos . pl_PositionVector ) / 2.0f;
|
|
#line 1002 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plMiddle . pl_OrientationAngle = m_plExpArmPos . pl_OrientationAngle ;
|
|
#line 1003 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penExplosion = CreateEntity (plMiddle , CLASS_BASIC_EFFECT );
|
|
#line 1004 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1005 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(FRnd () * 0.15f + 0.15f);
|
|
Jump(STATE_CURRENT, 0x015a0006, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0006_ArmExplosion_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0006
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0007, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0007_ArmExplosion_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0007
|
|
;
|
|
#line 1007 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D pl = GetPlacement ();
|
|
#line 1008 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
pl . pl_PositionVector += FLOAT3D (0.0f , LARVA_HANDLE_TRANSLATE , 0.0f);
|
|
#line 1009 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShakeItBaby (_pTimer -> CurrentTick () , 1.0f , FALSE );
|
|
#line 1010 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 1011 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 1012 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 1013 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (m_fStretch * 1.5 , m_fStretch * 1.5 , m_fStretch * 1.5);
|
|
#line 1014 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penExplosion = CreateEntity (pl , CLASS_BASIC_EFFECT );
|
|
#line 1015 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1016 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_ROCKET ;
|
|
#line 1017 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (m_plExpGunPos , CLASS_BASIC_EFFECT );
|
|
#line 1018 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1020 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnWingDebris ();
|
|
#line 1021 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
RemoveWing (m_iExplodingArm );
|
|
#line 1024 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(1.5f);
|
|
Jump(STATE_CURRENT, 0x015a0008, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0008_ArmExplosion_05(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0008
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0009, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0009_ArmExplosion_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0009
|
|
;
|
|
#line 1026 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bExploding = FALSE ;
|
|
#line 1027 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bActive = TRUE ;
|
|
#line 1030 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (EBegin ());
|
|
#line 1032 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 1032 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CExotechLarva::
|
|
#line 1035 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Die(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_Die
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EDeath, "CExotechLarva::Die expects 'EDeath' as input!"); const EDeath &eDeath = (const EDeath &)__eeInput;
|
|
#line 1037 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penDeathInflictor = eDeath . eLastDamage . penInflictor ;
|
|
#line 1039 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bActive = FALSE ;
|
|
#line 1040 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_iExplosions = 8;
|
|
#line 1042 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soChirp , SOUND_DEATH , SOF_3D );
|
|
#line 1043 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_soLaser . Stop ();
|
|
#line 1046 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Jump(STATE_CURRENT,0x015a000d, FALSE, EInternal());return TRUE;}BOOL CExotechLarva::H0x015a000d_Die_03(const CEntityEvent &__eeInput)
|
|
#line 1047 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a000d
|
|
if(!((m_iExplosions --) > 0)){ Jump(STATE_CURRENT,0x015a000e, FALSE, EInternal());return TRUE;}
|
|
#line 1048 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShakeItBaby (_pTimer -> CurrentTick () , 0.5f , FALSE );
|
|
#line 1051 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D plExplosion ;
|
|
#line 1052 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plExplosion . pl_OrientationAngle = ANGLE3D (0.0f , 0.0f , 0.0f);
|
|
#line 1053 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plExplosion . pl_PositionVector = FLOAT3D (FRnd () * 2.0 - 1.0f , FRnd () * 3.0 - 1.5f + LARVA_HANDLE_TRANSLATE , FRnd () * 2.0 - 1.0f) * m_fStretch + GetPlacement () . pl_PositionVector ;
|
|
#line 1054 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT vExpSize = (FRnd () * 0.7f + 0.7f) * m_fStretch ;
|
|
#line 1056 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 1057 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 1058 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 1059 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (vExpSize , vExpSize , vExpSize );
|
|
#line 1060 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT );
|
|
#line 1061 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1062 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(FRnd () * 0.05f + 0.35f);
|
|
Jump(STATE_CURRENT, 0x015a000b, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a000b_Die_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a000b
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a000c, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a000c_Die_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a000c
|
|
;Jump(STATE_CURRENT,0x015a000d, FALSE, EInternal());return TRUE;
|
|
#line 1063 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}BOOL CExotechLarva::H0x015a000e_Die_04(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a000e
|
|
|
|
#line 1065 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShakeItBaby (_pTimer -> CurrentTick () , 2.0f , FALSE );
|
|
#line 1068 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D plExplosion ;
|
|
#line 1069 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plExplosion . pl_OrientationAngle = ANGLE3D (0.0f , 0.0f , 0.0f);
|
|
#line 1070 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plExplosion . pl_PositionVector = FLOAT3D (0.0f , - 1.5f + LARVA_HANDLE_TRANSLATE , 1.5f) * m_fStretch + GetPlacement () . pl_PositionVector ;
|
|
#line 1071 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 1072 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 1073 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 1074 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (m_fStretch , m_fStretch , m_fStretch ) * 2.0f;
|
|
#line 1075 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CEntityPointer penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT );
|
|
#line 1076 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1077 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plExplosion . pl_PositionVector = FLOAT3D (- 1.0f , - 0.2f + LARVA_HANDLE_TRANSLATE , - 1.5f) * m_fStretch + GetPlacement () . pl_PositionVector ;
|
|
#line 1078 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT );
|
|
#line 1079 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1080 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plExplosion . pl_PositionVector = FLOAT3D (1.0f , 1.7f + LARVA_HANDLE_TRANSLATE , 0.1f) * m_fStretch + GetPlacement () . pl_PositionVector ;
|
|
#line 1081 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT );
|
|
#line 1082 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1083 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plExplosion . pl_PositionVector = GetPlacement () . pl_PositionVector ;
|
|
#line 1084 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_ROCKET ;
|
|
#line 1085 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT );
|
|
#line 1086 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1088 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vExpDamage = FLOAT3D (0.0f , 15.0f , 0.0f);
|
|
#line 1089 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vTranslation = m_vExpDamage ;
|
|
#line 1090 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CPlacement3D plDebris = GetPlacement ();
|
|
#line 1091 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plDebris . pl_PositionVector += FLOAT3D (0.0f , LARVA_HANDLE_TRANSLATE , 0.0f);
|
|
#line 1092 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Begin (EIBT_FLESH , DPT_BLOODTRAIL , BET_BLOODSTAIN , 1.0f , m_vExpDamage , en_vCurrentTranslationAbsolute , 5.0f , 2.0f);
|
|
#line 1093 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Spawn_Independent (this , this , MODEL_DEBRIS_BODY , TEXTURE_BODY , 0 , 0 , 0 , 0 , m_fStretch ,
|
|
#line 1094 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plDebris , vTranslation , ANGLE3D (45.0f , 230.0f , 0.0f));
|
|
#line 1095 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vTranslation += FLOAT3D (FRnd () * 4.0f - 2.0f , FRnd () * 4.0f - 2.0f , FRnd () * 4.0f - 2.0f);
|
|
#line 1096 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Spawn_Independent (this , this , MODEL_DEBRIS_TAIL01 , TEXTURE_BODY , 0 , 0 , 0 , 0 , m_fStretch ,
|
|
#line 1097 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plDebris , vTranslation , ANGLE3D (15.0f , 130.0f , 0.0f));
|
|
#line 1098 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vTranslation += FLOAT3D (FRnd () * 4.0f - 2.0f , FRnd () * 4.0f - 2.0f , FRnd () * 4.0f - 2.0f);
|
|
#line 1099 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Spawn_Independent (this , this , MODEL_DEBRIS_TAIL02 , TEXTURE_BODY , 0 , 0 , 0 , 0 , m_fStretch ,
|
|
#line 1100 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
plDebris , vTranslation , ANGLE3D (145.0f , 30.0f , 0.0f));
|
|
#line 1101 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
for(INDEX i = 0;i < 8;i ++){
|
|
#line 1102 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Debris_Spawn (this , this , MODEL_DEBRIS_FLESH , TEXTURE_DEBRIS_FLESH , 0 , 0 , 0 , 0 , m_fStretch ,
|
|
#line 1103 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D (FRnd () * 0.6f + 0.2f , FRnd () * 0.6f + 0.2f + LARVA_HANDLE_TRANSLATE , FRnd () * 0.6f + 0.2f));
|
|
#line 1104 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1107 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 1108 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_EXPLOSION_DEBRIS ;
|
|
#line 1109 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (1 , 1 , 1);
|
|
#line 1110 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT );
|
|
#line 1111 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1113 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eSpawnEffect . betType = BET_EXPLOSION_SMOKE ;
|
|
#line 1114 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion = CreateEntity (plExplosion , CLASS_BASIC_EFFECT );
|
|
#line 1115 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 1117 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
EDeath eDeath ;
|
|
#line 1118 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eDeath . eLastDamage . penInflictor = m_penDeathInflictor ;
|
|
#line 1120 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
EActivateBeam eab ;
|
|
#line 1121 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eab . bTurnOn = FALSE ;
|
|
#line 1122 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penRecharger -> SendEvent (eab );
|
|
#line 1124 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penDeathTarget ){
|
|
#line 1125 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendToTarget (m_penDeathTarget , EET_TRIGGER , FixupCausedToPlayer (this , m_penEnemy ));
|
|
#line 1126 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1128 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Jump(STATE_CURRENT, STATE_CEnemyBase_Die, FALSE, eDeath );return TRUE; ASSERT(FALSE); return TRUE;};BOOL CExotechLarva::
|
|
#line 1132 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Fire(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_Fire
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarva::Fire expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 1134 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
UpdateFiringPos ();
|
|
#line 1136 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(!(m_bLeftArmActive || m_bRightArmActive )){ Jump(STATE_CURRENT,0x015a001d, FALSE, EInternal());return TRUE;}
|
|
#line 1137 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_iRnd = IRnd () % 9;
|
|
#line 1138 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iRnd > 6 && ! m_bRechargePose && GetHealth () > 0.1f * m_fMaxHealth ){
|
|
#line 1139 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soFire3 , SOUND_FIRE_TAIL , SOF_3D );
|
|
#line 1140 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShootTailProjectile ();
|
|
#line 1141 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1142 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iRnd > 6 && m_bRechargePose ){
|
|
#line 1143 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_iRnd = 3;
|
|
#line 1144 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1146 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iRnd > 3){
|
|
#line 1147 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 1147 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1148 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1150 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Jump(STATE_CURRENT,0x015a001a, FALSE, EInternal());return TRUE;}BOOL CExotechLarva::H0x015a001a_Fire_11(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a001a
|
|
if(!(m_iRnd > 0)){ Jump(STATE_CURRENT,0x015a001b, FALSE, EInternal());return TRUE;}
|
|
#line 1151 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(!(m_bLeftArmActive )){ Jump(STATE_CURRENT,0x015a0014, FALSE, EInternal());return TRUE;}
|
|
#line 1152 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soFire1 , SOUND_FIRE_PLASMA , SOF_3D );
|
|
#line 1153 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShootProjectile (PRT_LARVA_PLASMA , m_vFirePosLeftPlasmaRel , ANGLE3D (0 , 0 , 0));
|
|
#line 1154 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
RemoveAttachmentFromModel (* PlasmaLeftModel () , PLASMAGUN_ATTACHMENT_PROJECTILE );
|
|
#line 1155 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.25f);
|
|
Jump(STATE_CURRENT, 0x015a0010, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0010_Fire_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0010
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0011, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0011_Fire_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0011
|
|
;
|
|
#line 1156 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlasmaLeftModel () -> PlayAnim (PLASMAGUN_ANIM_SPAWNING , 0);
|
|
#line 1157 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.25f);
|
|
Jump(STATE_CURRENT, 0x015a0012, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0012_Fire_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0012
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0013, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0013_Fire_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0013
|
|
;
|
|
#line 1158 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * PlasmaLeftModel () , PLASMAGUN_ATTACHMENT_PROJECTILE , MODEL_PLASMA , TEXTURE_PLASMA , 0 , 0 , 0);
|
|
#line 1159 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CAttachmentModelObject * amo = PlasmaLeftModel () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_LEFT );
|
|
#line 1160 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo -> amo_moModelObject . StretchModel (FLOAT3D (m_fStretch , m_fStretch , m_fStretch ));Jump(STATE_CURRENT,0x015a0014, FALSE, EInternal());return TRUE;}BOOL CExotechLarva::H0x015a0014_Fire_05(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0014
|
|
|
|
#line 1162 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(!(m_bRightArmActive )){ Jump(STATE_CURRENT,0x015a0019, FALSE, EInternal());return TRUE;}
|
|
#line 1163 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soFire2 , SOUND_FIRE_PLASMA , SOF_3D );
|
|
#line 1164 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShootProjectile (PRT_LARVA_PLASMA , m_vFirePosRightPlasmaRel , ANGLE3D (0 , 0 , 0));
|
|
#line 1165 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
RemoveAttachmentFromModel (* PlasmaRightModel () , PLASMAGUN_ATTACHMENT_PROJECTILE );
|
|
#line 1166 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.25f);
|
|
Jump(STATE_CURRENT, 0x015a0015, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0015_Fire_06(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0015
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0016, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0016_Fire_07(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0016
|
|
;
|
|
#line 1167 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlasmaRightModel () -> PlayAnim (PLASMAGUN_ANIM_SPAWNING , 0);
|
|
#line 1168 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.25f);
|
|
Jump(STATE_CURRENT, 0x015a0017, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0017_Fire_08(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0017
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0018, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0018_Fire_09(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0018
|
|
;
|
|
#line 1169 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * PlasmaRightModel () , PLASMAGUN_ATTACHMENT_PROJECTILE , MODEL_PLASMA , TEXTURE_PLASMA , 0 , 0 , 0);
|
|
#line 1170 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CAttachmentModelObject * amo = PlasmaRightModel () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_LEFT );
|
|
#line 1171 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo -> amo_moModelObject . StretchModel (FLOAT3D (m_fStretch , m_fStretch , m_fStretch ));Jump(STATE_CURRENT,0x015a0019, FALSE, EInternal());return TRUE;}BOOL CExotechLarva::H0x015a0019_Fire_10(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0019
|
|
|
|
#line 1173 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_iRnd --;Jump(STATE_CURRENT,0x015a001a, FALSE, EInternal());return TRUE;
|
|
#line 1174 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}BOOL CExotechLarva::H0x015a001b_Fire_12(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a001b
|
|
Jump(STATE_CURRENT,0x015a001c, FALSE, EInternal());return TRUE;}BOOL CExotechLarva::H0x015a001d_Fire_14(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a001d
|
|
if(TRUE ){
|
|
#line 1177 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_iRnd = IRnd () % 10;
|
|
#line 1178 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iRnd > 6 && ! m_bRechargePose && GetHealth () > 0.1f * m_fMaxHealth ){
|
|
#line 1179 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soFire3 , SOUND_FIRE_TAIL , SOF_3D );
|
|
#line 1180 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShootTailProjectile ();
|
|
#line 1181 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1182 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_iRnd < 4 && _pTimer -> CurrentTick () > m_tmDontFireLaserBefore ){
|
|
#line 1183 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soLaser , SOUND_LASER_CHARGE , SOF_3D );
|
|
#line 1184 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , 3.0f , 129);
|
|
#line 1185 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_tmDontFireLaserBefore = _pTimer -> CurrentTick () + m_fMinimumLaserWait ;
|
|
#line 1186 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1187 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}Jump(STATE_CURRENT,0x015a001c, FALSE, EInternal());return TRUE;}
|
|
BOOL CExotechLarva::H0x015a001c_Fire_13(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a001c
|
|
|
|
#line 1189 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PerhapsChangeTarget ();
|
|
#line 1191 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 1191 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CExotechLarva::
|
|
#line 1194 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Hit(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_Hit
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarva::Hit expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 1195 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 1195 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CExotechLarva::
|
|
#line 1198 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
BeIdle(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_BeIdle
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarva::BeIdle expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 1200 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PerhapsChangeTarget ();
|
|
#line 1202 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.5f);
|
|
Jump(STATE_CURRENT, 0x015a0020, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0020_BeIdle_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0020
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0021, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0021_BeIdle_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0021
|
|
;
|
|
#line 1204 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Jump(STATE_CURRENT,0x015a0024, FALSE, EInternal());return TRUE;}BOOL CExotechLarva::H0x015a0024_BeIdle_05(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0024
|
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x015a0025, FALSE, EInternal());return TRUE;}
|
|
#line 1205 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FindNewTarget ();
|
|
#line 1206 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (EReconsiderBehavior ());
|
|
#line 1207 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.5f);
|
|
Jump(STATE_CURRENT, 0x015a0022, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0022_BeIdle_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0022
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a0023, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a0023_BeIdle_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0023
|
|
;Jump(STATE_CURRENT,0x015a0024, FALSE, EInternal());return TRUE;
|
|
#line 1208 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}BOOL CExotechLarva::H0x015a0025_BeIdle_06(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0025
|
|
ASSERT(FALSE); return TRUE;};BOOL CExotechLarva::
|
|
#line 1212 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
LarvaLoop(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_LarvaLoop
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarva::LarvaLoop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 1214 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FindNewTarget ();
|
|
#line 1215 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (EReconsiderBehavior ());
|
|
#line 1217 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
StartModelAnim (BODY_ANIM_IDLE , AOF_SMOOTHCHANGE | AOF_LOOPING );
|
|
#line 1219 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , 0.5f , 128);
|
|
#line 1220 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , 0.5f , 145);
|
|
#line 1221 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x015a0027, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0027_LarvaLoop_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0027
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):
|
|
#line 1223 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{const EBegin&e= (EBegin&)__eeInput;
|
|
|
|
#line 1224 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(! m_bLeftArmActive && ! m_bRightArmActive ){
|
|
#line 1225 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject & amo = GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_BACKARMS ) -> amo_moModelObject ;
|
|
#line 1226 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo . PlayAnim (BACKARMS_ANIM_ACTIVATING , AOF_SMOOTHCHANGE | AOF_NORESTART );
|
|
#line 1227 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soFire1 , SOUND_DEPLOYLASER , SOF_3D );
|
|
#line 1228 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , amo . GetAnimLength (BACKARMS_ANIM_ACTIVATING ) , 160);
|
|
#line 1229 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1230 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Call(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE;
|
|
#line 1231 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_ELarvaArmDestroyed):
|
|
#line 1234 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{const ELarvaArmDestroyed&ead= (ELarvaArmDestroyed&)__eeInput;
|
|
|
|
#line 1235 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_iExplodingArm = ead . iArm ;
|
|
#line 1236 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Call(STATE_CURRENT, STATE_CExotechLarva_ArmExplosion, TRUE, EVoid());return TRUE;
|
|
#line 1237 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_ELarvaRechargePose):
|
|
#line 1240 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{const ELarvaRechargePose&elrp= (ELarvaRechargePose&)__eeInput;
|
|
|
|
#line 1241 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(elrp . bStart == TRUE && m_bRechargePose != TRUE ){
|
|
#line 1242 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
StartModelAnim (BODY_ANIM_TORECHARGING , AOF_SMOOTHCHANGE | AOF_NORESTART );
|
|
#line 1243 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , GetModelObject () -> GetAnimLength (BODY_ANIM_TORECHARGING ) , 156);
|
|
#line 1244 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1245 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(elrp . bStart == FALSE && m_bRechargePose != FALSE ){
|
|
#line 1246 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
StartModelAnim (BODY_ANIM_FROMRECHARGING , AOF_SMOOTHCHANGE | AOF_NORESTART );
|
|
#line 1247 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , GetModelObject () -> GetAnimLength (BODY_ANIM_FROMRECHARGING ) , 157);
|
|
#line 1248 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1249 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1250 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EReminder):
|
|
#line 1253 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{const EReminder&er= (EReminder&)__eeInput;
|
|
|
|
#line 1255 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(er . iValue == 128){
|
|
#line 1257 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(RechargerActive ()){
|
|
#line 1258 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , 1.0f , 128);
|
|
#line 1259 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else {
|
|
#line 1260 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRecharging = FALSE ;
|
|
#line 1261 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_ltTarget = LT_ENEMY ;
|
|
#line 1263 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ELarvaRechargePose elrp ;
|
|
#line 1264 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
elrp . bStart = FALSE ;
|
|
#line 1265 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (elrp );
|
|
#line 1266 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1268 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bActive && m_bRecharging && DistanceXZ (this , m_penRecharger ) < 5.0f){
|
|
#line 1269 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bRechargePose ){
|
|
#line 1270 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(((CExotechLarvaCharger *) & * m_penRecharger ) -> m_bBeamActive )
|
|
#line 1271 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
{
|
|
#line 1272 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(! m_bRechargedAtLeastOnce ){
|
|
#line 1273 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_penFirstRechargeTarget ){
|
|
#line 1274 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendToTarget (m_penFirstRechargeTarget , EET_TRIGGER , FixupCausedToPlayer (this , m_penEnemy ));
|
|
#line 1275 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1276 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRechargedAtLeastOnce = TRUE ;
|
|
#line 1277 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1278 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetHealth (ClampUp (GetHealth () + m_fRechargePerSecond , m_fMaxHealth * m_fMaxRechargedHealth ));
|
|
#line 1279 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(GetHealth () > m_fMaxHealth * 0.95){
|
|
#line 1280 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_ltTarget = LT_ENEMY ;
|
|
#line 1281 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRecharging = FALSE ;
|
|
#line 1283 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
EActivateBeam eab ;
|
|
#line 1284 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eab . bTurnOn = FALSE ;
|
|
#line 1285 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penRecharger -> SendEvent (eab );
|
|
#line 1287 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ELarvaRechargePose elrp ;
|
|
#line 1288 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
elrp . bStart = FALSE ;
|
|
#line 1289 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (elrp );
|
|
#line 1290 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1291 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(TRUE ){
|
|
#line 1292 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
EActivateBeam eab ;
|
|
#line 1293 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
eab . bTurnOn = TRUE ;
|
|
#line 1294 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_penRecharger -> SendEvent (eab );
|
|
#line 1295 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1296 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else {
|
|
#line 1297 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ELarvaRechargePose elrp ;
|
|
#line 1298 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
elrp . bStart = TRUE ;
|
|
#line 1299 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SendEvent (elrp );
|
|
#line 1300 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1301 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1303 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else if(TRUE ){
|
|
#line 1304 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(GetHealth () < (m_fLarvaHealth * 0.7f)){
|
|
#line 1305 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(! RechargerActive ()){
|
|
#line 1306 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_ltTarget = LT_ENEMY ;
|
|
#line 1307 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else {
|
|
#line 1308 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRecharging = TRUE ;
|
|
#line 1309 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_ltTarget = LT_RECHARGER ;
|
|
#line 1310 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1311 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1312 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1313 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1315 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(er . iValue == 145){
|
|
#line 1316 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FindNewTarget ();
|
|
#line 1317 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(AnyPlayerCloserThen (9.0f) && GetHealth () > 0.1f * m_fMaxHealth ){
|
|
#line 1318 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
UpdateFiringPos ();
|
|
#line 1319 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soFire3 , SOUND_FIRE_TAIL , SOF_3D );
|
|
#line 1320 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShootTailProjectile ();
|
|
#line 1321 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1322 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
else if(m_penEnemy && GetHealth () > 0.1f * m_fMaxHealth ){
|
|
#line 1323 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(! IsVisible (m_penEnemy )){
|
|
#line 1324 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
INDEX iRnd = IRnd () % 6;
|
|
#line 1325 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(iRnd > 4){
|
|
#line 1326 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
UpdateFiringPos ();
|
|
#line 1327 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soFire3 , SOUND_FIRE_TAIL , SOF_3D );
|
|
#line 1328 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ShootTailProjectile ();
|
|
#line 1329 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1330 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1331 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1332 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , 0.5f , 145);
|
|
#line 1333 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1335 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(er . iValue == 129){
|
|
#line 1336 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bActive && m_bLaserActive ){FireLaser ();}
|
|
#line 1337 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , 0.35f , 130);
|
|
#line 1338 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1340 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(er . iValue == 130){
|
|
#line 1341 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(m_bActive ){ExplodeLaser ();}
|
|
#line 1342 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SpawnReminder (this , 0.75f , 131);
|
|
#line 1343 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1345 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(er . iValue == 131){
|
|
#line 1346 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRenderLeftLaser = FALSE ;
|
|
#line 1347 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRenderRightLaser = FALSE ;
|
|
#line 1348 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1350 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(er . iValue == 156){
|
|
#line 1351 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRechargePose = TRUE ;
|
|
#line 1352 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
StartModelAnim (BODY_ANIM_RECHARGING , AOF_SMOOTHCHANGE | AOF_LOOPING );
|
|
#line 1353 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1355 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(er . iValue == 157){
|
|
#line 1356 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bRechargePose = FALSE ;
|
|
#line 1357 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
StartModelAnim (BODY_ANIM_IDLE , AOF_SMOOTHCHANGE | AOF_LOOPING );
|
|
#line 1359 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}else if(er . iValue == 160){
|
|
#line 1360 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject & amo = GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_BACKARMS ) -> amo_moModelObject ;
|
|
#line 1361 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo . PlayAnim (BACKARMS_ANIM_ACTIVE , AOF_SMOOTHCHANGE | AOF_LOOPING );
|
|
#line 1362 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bLaserActive = TRUE ;
|
|
#line 1363 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1364 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1365 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 1366 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}return TRUE;}BOOL CExotechLarva::H0x015a0028_LarvaLoop_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0028
|
|
ASSERT(FALSE); return TRUE;};BOOL CExotechLarva::
|
|
#line 1369 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarva_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarva::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 1371 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
InitAsModel ();
|
|
#line 1372 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetPhysicsFlags (EPF_MODEL_FLYING | EPF_HASLUNGS | EPF_ABSOLUTETRANSLATE );
|
|
#line 1373 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetCollisionFlags (ECF_MODEL );
|
|
#line 1374 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetFlags (GetFlags () | ENF_ALIVE );
|
|
#line 1375 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
en_fDensity = 2000.0f;
|
|
#line 1378 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetModel (MODEL_BODY );
|
|
#line 1379 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetModelMainTexture (TEXTURE_BODY );
|
|
#line 1382 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , BODY_ATTACHMENT_ARM_LEFT , MODEL_WING , TEXTURE_WING , 0 , 0 , 0);
|
|
#line 1383 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject & amo0 = GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_LEFT ) -> amo_moModelObject ;
|
|
#line 1384 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , amo0 , ARM_ATTACHMENT_PLASMAGUN , MODEL_PLASMAGUN , TEXTURE_PLASMAGUN , 0 , 0 , 0);
|
|
#line 1387 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , BODY_ATTACHMENT_ARM_RIGHT , MODEL_WING , TEXTURE_WING , 0 , 0 , 0);
|
|
#line 1388 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject & amo1 = GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_ARM_RIGHT ) -> amo_moModelObject ;
|
|
#line 1389 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo1 . StretchModel (FLOAT3D (- 1.0f , 1.0f , 1.0f));
|
|
#line 1390 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , amo1 , ARM_ATTACHMENT_PLASMAGUN , MODEL_PLASMAGUN , TEXTURE_PLASMAGUN , 0 , 0 , 0);
|
|
#line 1391 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject & amo2 = amo1 . GetAttachmentModel (ARM_ATTACHMENT_PLASMAGUN ) -> amo_moModelObject ;
|
|
#line 1392 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
amo2 . StretchModel (FLOAT3D (- 1.0f , 1.0f , 1.0f));
|
|
#line 1395 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , BODY_ATTACHMENT_BACKARMS , MODEL_BLADES , TEXTURE_BODY , 0 , 0 , 0);
|
|
#line 1398 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , BODY_ATTACHMENT_EXOTECHLARVA , MODEL_EXOTECHLARVA , TEXTURE_EXOTECHLARVA , 0 , 0 , 0);
|
|
#line 1399 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
CModelObject & amo3 = GetModelObject () -> GetAttachmentModel (BODY_ATTACHMENT_EXOTECHLARVA ) -> amo_moModelObject ;
|
|
#line 1400 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , amo3 , EXOTECHLARVA_ATTACHMENT_BEAM , MODEL_BEAM , TEXTURE_BEAM , 0 , 0 , 0);
|
|
#line 1401 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , amo3 , EXOTECHLARVA_ATTACHMENT_ENERGYBEAMS , MODEL_ENERGYBEAMS , TEXTURE_ENERGYBEAMS , 0 , 0 , 0);
|
|
#line 1402 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , amo3 , EXOTECHLARVA_ATTACHMENT_FLARE , MODEL_FLARE , TEXTURE_FLARE , 0 , 0 , 0);
|
|
#line 1404 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * PlasmaLeftModel () , PLASMAGUN_ATTACHMENT_PROJECTILE , MODEL_PLASMA , TEXTURE_PLASMA , 0 , 0 , 0);
|
|
#line 1405 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
AddAttachmentToModel (this , * PlasmaRightModel () , PLASMAGUN_ATTACHMENT_PROJECTILE , MODEL_PLASMA , TEXTURE_PLASMA , 0 , 0 , 0);
|
|
#line 1408 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
GetModelObject () -> StretchModelRelative (FLOAT3D (m_fStretch , m_fStretch , m_fStretch ));
|
|
#line 1410 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vFirePosLeftPlasmaRel = FIREPOS_PLASMA_LEFT * m_fStretch ;
|
|
#line 1411 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vFirePosRightPlasmaRel = FIREPOS_PLASMA_RIGHT * m_fStretch ;
|
|
#line 1413 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_vFirePosTailRel = FIREPOS_TAIL * m_fStretch ;
|
|
#line 1416 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bBoss = TRUE ;
|
|
#line 1419 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fWalkSpeed = 0.0f;
|
|
#line 1420 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_aWalkRotateSpeed = 100.0f;
|
|
#line 1421 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fAttackRunSpeed = 7.5f;
|
|
#line 1422 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_aAttackRotateSpeed = 100.0f;
|
|
#line 1424 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fStopDistance = m_fStopRadius ;
|
|
#line 1425 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fBlowUpAmount = 100.0f;
|
|
#line 1426 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fBodyParts = 0;
|
|
#line 1427 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fDamageWounded = 0.0f;
|
|
#line 1428 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_iScore = 750000;
|
|
#line 1429 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_sptType = SPT_BLOOD ;
|
|
#line 1430 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fAttackDistance = 100.0f;
|
|
#line 1431 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fCloseDistance = 0.0f;
|
|
#line 1433 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fAttackFireTime = 0.5f;
|
|
#line 1434 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fCloseFireTime = 0.5f;
|
|
#line 1437 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
en_fAcceleration = UpperLimit (1.0f);
|
|
#line 1438 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
en_fDeceleration = UpperLimit (1.0f);
|
|
#line 1441 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetHealth (m_fLarvaHealth );
|
|
#line 1442 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_fMaxHealth = m_fLarvaHealth ;
|
|
#line 1444 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bActive = TRUE ;
|
|
#line 1445 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bExploding = FALSE ;
|
|
#line 1446 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bLaserActive = FALSE ;
|
|
#line 1451 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
ModelChangeNotify ();
|
|
#line 1452 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
StandingAnim ();
|
|
#line 1454 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.05f);
|
|
Jump(STATE_CURRENT, 0x015a0029, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a0029_Main_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0029
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015a002a, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarva::H0x015a002a_Main_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a002a
|
|
;
|
|
#line 1457 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bInvulnerable = TRUE ;
|
|
#line 1459 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
if(! DoSafetyChecks ()){
|
|
#line 1460 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Destroy ();
|
|
#line 1461 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 1461 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
return TRUE;
|
|
#line 1462 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}
|
|
#line 1465 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x015a002b, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a002b_Main_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a002b
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETrigger):{const ETrigger&e= (ETrigger&)__eeInput;
|
|
UnsetTimer();Jump(STATE_CURRENT,0x015a002c, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
|
|
#line 1469 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}return TRUE;}BOOL CExotechLarva::H0x015a002c_Main_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a002c
|
|
|
|
#line 1471 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
PlaySound (m_soChirp , SOUND_CHIRP , SOF_3D | SOF_LOOP );
|
|
#line 1474 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Jump(STATE_CURRENT,0x015a002f, FALSE, EInternal());return TRUE;}BOOL CExotechLarva::H0x015a002f_Main_07(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a002f
|
|
if(!(DistanceTo (this , m_penMarkerNew ) > 5.0f)){ Jump(STATE_CURRENT,0x015a0030, FALSE, EInternal());return TRUE;}
|
|
#line 1475 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetTimerAfter(0.05f);
|
|
Jump(STATE_CURRENT, 0x015a002d, FALSE, EBegin());return TRUE;}BOOL CExotechLarva::H0x015a002d_Main_05(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a002d
|
|
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;
|
|
|
|
#line 1478 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
FLOAT3D vToMarker = m_penMarkerNew -> GetPlacement () . pl_PositionVector - GetPlacement () . pl_PositionVector ;
|
|
#line 1479 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
vToMarker . Normalize ();
|
|
#line 1480 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
SetDesiredTranslation (vToMarker * m_fAttackRunSpeed );
|
|
#line 1481 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
UnsetTimer();Jump(STATE_CURRENT,0x015a002e, FALSE, EInternal());return TRUE;
|
|
#line 1482 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 1483 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}return TRUE;}BOOL CExotechLarva::H0x015a002e_Main_06(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a002e
|
|
Jump(STATE_CURRENT,0x015a002f, FALSE, EInternal());return TRUE;
|
|
#line 1484 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
}BOOL CExotechLarva::H0x015a0030_Main_08(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015a0030
|
|
|
|
#line 1486 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
m_bInvulnerable = FALSE ;
|
|
#line 1489 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarva.es"
|
|
Jump(STATE_CURRENT, STATE_CExotechLarva_LarvaLoop, TRUE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;}; |