mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 12:15:53 +01:00
474 lines
22 KiB
C++
474 lines
22 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
|
||
|
#include "EntitiesMP/EnemyBase.h"
|
||
|
#include "ModelsMP/Enemies/ExotechLarva/Projectile/TailProjectile.h"
|
||
|
|
||
|
|
||
|
#include <EntitiesMP/LarvaOffspring.h>
|
||
|
#include <EntitiesMP/LarvaOffspring_tables.h>
|
||
|
CEntityEvent *ELaunchLarvaOffspring::MakeCopy(void) { CEntityEvent *peeCopy = new ELaunchLarvaOffspring(*this); return peeCopy;}
|
||
|
ELaunchLarvaOffspring::ELaunchLarvaOffspring() : CEntityEvent(EVENTCODE_ELaunchLarvaOffspring) {;
|
||
|
ClearToDefault(penLauncher);
|
||
|
};
|
||
|
#line 23 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
|
||
|
#define ECF_OFFSPRING ( \
|
||
|
((ECBI_MODEL|ECBI_BRUSH|ECBI_PROJECTILE_MAGIC|ECBI_PROJECTILE_SOLID|ECBI_ITEM|ECBI_MODEL_HOLDER|ECBI_CORPSE_SOLID)<<ECB_TEST) |\
|
||
|
((ECBI_MODEL)<<ECB_IS) |\
|
||
|
((ECBI_MODEL)<<ECB_PASS) )
|
||
|
|
||
|
void CLarvaOffspring::SetDefaultProperties(void) {
|
||
|
m_penLauncher = NULL;
|
||
|
m_penTarget = NULL;
|
||
|
m_fIgnoreTime = 0.0f;
|
||
|
m_fFlyTime = 0.0f;
|
||
|
m_fStartTime = 0.0f;
|
||
|
m_fDamageAmount = 0.0f;
|
||
|
m_fRangeDamageAmount = 0.0f;
|
||
|
m_fDamageHotSpotRange = 0.0f;
|
||
|
m_fDamageFallOffRange = 0.0f;
|
||
|
m_fSoundRange = 0.0f;
|
||
|
m_bExplode = FALSE ;
|
||
|
m_aRotateSpeed = 0.0f;
|
||
|
m_tmExpandBox = 0.0f;
|
||
|
m_soEffect.SetOwner(this);
|
||
|
m_soEffect.Stop_internal();
|
||
|
bLockedOn = TRUE ;
|
||
|
m_penPrediction = NULL;
|
||
|
CMovableModelEntity::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
void CLarvaOffspring::PreMoving(void) {
|
||
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(m_tmExpandBox > 0){
|
||
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(_pTimer -> CurrentTick () > m_fStartTime + m_tmExpandBox ){
|
||
|
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ChangeCollisionBoxIndexWhenPossible (1);
|
||
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_tmExpandBox = 0;
|
||
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
CMovableModelEntity :: PreMoving ();
|
||
|
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
|
||
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
void CLarvaOffspring::Precache()
|
||
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
PrecacheSound (SOUND_LARVETTE );
|
||
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
PrecacheModel (MODEL_LARVA_TAIL );
|
||
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
PrecacheTexture (TEXTURE_LARVA_TAIL );
|
||
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
PrecacheClass (CLASS_BASIC_EFFECT , BET_ROCKET );
|
||
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
PrecacheClass (CLASS_BASIC_EFFECT , BET_SHOCKWAVE );
|
||
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
|
||
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
void CLarvaOffspring::InitializeProjectile(void) {
|
||
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(IsDerivedFromClass (m_penLauncher , "Enemy Base")){
|
||
|
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_penTarget = ((CEnemyBase *) & * m_penLauncher ) -> m_penEnemy ;
|
||
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
InitAsModel ();
|
||
|
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_SLIDING );
|
||
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetCollisionFlags (ECF_OFFSPRING );
|
||
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetModel (MODEL_LARVA_TAIL );
|
||
|
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetModelMainTexture (TEXTURE_LARVA_TAIL );
|
||
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
GetModelObject () -> StretchModel (FLOAT3D (4.0f , 4.0f , 4.0f));
|
||
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ModelChangeNotify ();
|
||
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_soEffect . Set3DParameters (50.0f , 10.0f , 1.0f , 1.0f);
|
||
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
PlaySound (m_soEffect , SOUND_LARVETTE , SOF_3D | SOF_LOOP );
|
||
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
LaunchAsPropelledProjectile (FLOAT3D (0.0f , 0.0f , - 30.0f) , (CMovableEntity *) (CEntity *) m_penLauncher );
|
||
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetDesiredRotation (ANGLE3D (0 , 0 , 0));
|
||
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_fFlyTime = 12.0f;
|
||
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_fDamageAmount = 10.0f;
|
||
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_aRotateSpeed = 275.0f;
|
||
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetHealth (10.0f);
|
||
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
|
||
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
void CLarvaOffspring::LarvaTailExplosion(void) {
|
||
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ESpawnEffect ese ;
|
||
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT3D vPoint ;
|
||
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOATplane3D vPlaneNormal ;
|
||
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fDistanceToEdge ;
|
||
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . colMuliplier = C_WHITE | CT_OPAQUE ;
|
||
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . betType = BET_ROCKET ;
|
||
|
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . vStretch = FLOAT3D (1 , 1 , 1);
|
||
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SpawnEffect (GetPlacement () , ese );
|
||
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(IsDerivedFromClass (m_penLauncher , "Player")){
|
||
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SpawnRangeSound (m_penLauncher , this , SNDT_PLAYER , m_fSoundRange );
|
||
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . betType = BET_EXPLOSION_DEBRIS ;
|
||
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SpawnEffect (GetPlacement () , ese );
|
||
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . betType = BET_EXPLOSION_SMOKE ;
|
||
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SpawnEffect (GetPlacement () , ese );
|
||
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(GetNearestPolygon (vPoint , vPlaneNormal , fDistanceToEdge )){
|
||
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if((vPoint - GetPlacement () . pl_PositionVector ) . Length () < 3.5f){
|
||
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . betType = BET_EXPLOSIONSTAIN ;
|
||
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . vNormal = FLOAT3D (vPlaneNormal );
|
||
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SpawnEffect (CPlacement3D (vPoint , ANGLE3D (0 , 0 , 0)) , ese );
|
||
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . betType = BET_SHOCKWAVE ;
|
||
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . vNormal = FLOAT3D (vPlaneNormal );
|
||
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SpawnEffect (CPlacement3D (vPoint , ANGLE3D (0 , 0 , 0)) , ese );
|
||
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . betType = BET_ROCKET_PLANE ;
|
||
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ese . vNormal = FLOAT3D (vPlaneNormal );
|
||
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SpawnEffect (CPlacement3D (vPoint + ese . vNormal / 50.0f , ANGLE3D (0 , 0 , 0)) , ese );
|
||
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
|
||
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
void CLarvaOffspring::ProjectileTouch(CEntityPointer penHit)
|
||
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ProjectileHit ();
|
||
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT3D vDirection ;
|
||
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fTransLen = en_vIntendedTranslation . Length ();
|
||
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(fTransLen > 0.5f)
|
||
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
vDirection = en_vIntendedTranslation / fTransLen ;
|
||
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
else
|
||
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
vDirection = - en_vGravityDir ;
|
||
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
const FLOAT fDamageMul = GetSeriousDamageMultiplier (m_penLauncher );
|
||
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
InflictDirectDamage (penHit , m_penLauncher , DMT_PROJECTILE , m_fDamageAmount * fDamageMul ,
|
||
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
GetPlacement () . pl_PositionVector , vDirection );
|
||
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
|
||
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
void CLarvaOffspring::ProjectileHit(void)
|
||
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(m_bExplode ){
|
||
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
const FLOAT fDamageMul = GetSeriousDamageMultiplier (m_penLauncher );
|
||
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
InflictRangeDamage (m_penLauncher , DMT_EXPLOSION , m_fRangeDamageAmount * fDamageMul ,
|
||
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
GetPlacement () . pl_PositionVector , m_fDamageHotSpotRange , m_fDamageFallOffRange );
|
||
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(m_fSoundRange > 0.0f){
|
||
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ESound eSound ;
|
||
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
eSound . EsndtSound = SNDT_EXPLOSION ;
|
||
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
eSound . penTarget = m_penLauncher ;
|
||
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SendEventInRange (eSound , FLOATaabbox3D (GetPlacement () . pl_PositionVector , m_fSoundRange ));
|
||
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
|
||
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
void CLarvaOffspring::SpawnEffect(const CPlacement3D & plEffect,const ESpawnEffect & eSpawnEffect) {
|
||
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
CEntityPointer penEffect = CreateEntity (plEffect , CLASS_BASIC_EFFECT );
|
||
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
penEffect -> Initialize (eSpawnEffect );
|
||
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
|
||
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ANGLE CLarvaOffspring::GetRotationSpeed(ANGLE aWantedAngle,ANGLE aRotateSpeed,FLOAT fWaitFrequency)
|
||
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ANGLE aResult ;
|
||
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(aWantedAngle < - aRotateSpeed * fWaitFrequency )
|
||
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
aResult = - aRotateSpeed ;
|
||
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
else if(aWantedAngle > aRotateSpeed * fWaitFrequency )
|
||
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
aResult = + aRotateSpeed ;
|
||
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 227 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
else
|
||
|
#line 228 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
aResult = aWantedAngle / fWaitFrequency ;
|
||
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
return aResult ;
|
||
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
BOOL CLarvaOffspring::
|
||
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
LarvaOffspringGuidedSlide(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CLarvaOffspring_LarvaOffspringGuidedSlide
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CLarvaOffspring::LarvaOffspringGuidedSlide expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
CEntity * penObstacle ;
|
||
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(CheckForCollisionNow (0 , & penObstacle )){
|
||
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ProjectileTouch (penObstacle );
|
||
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
return TRUE;
|
||
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Jump(STATE_CURRENT,0x01610004, FALSE, EInternal());return TRUE;}BOOL CLarvaOffspring::H0x01610004_LarvaOffspringGuidedSlide_03(const CEntityEvent &__eeInput)
|
||
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01610004
|
||
|
if(!(_pTimer -> CurrentTick () < (m_fStartTime + m_fFlyTime ))){ Jump(STATE_CURRENT,0x01610005, FALSE, EInternal());return TRUE;}
|
||
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fWaitFrequency = 0.1f;
|
||
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(m_penTarget != NULL ){
|
||
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
EntityInfo * pei = (EntityInfo *) (m_penTarget -> GetEntityInfo ());
|
||
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT3D vDesiredPosition ;
|
||
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
GetEntityInfoPosition (m_penTarget , pei -> vSourceCenter , vDesiredPosition );
|
||
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT3D vDesiredDirection = (vDesiredPosition - GetPlacement () . pl_PositionVector ) . Normalize ();
|
||
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ANGLE aWantedHeading = GetRelativeHeading (vDesiredDirection );
|
||
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ANGLE aHeading = GetRotationSpeed (aWantedHeading , m_aRotateSpeed , fWaitFrequency );
|
||
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fSpeedDecreasingFactor = ((180 - Abs (aWantedHeading )) / 180.0f);
|
||
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fSpeedIncreasingFactor = (vDesiredPosition - GetPlacement () . pl_PositionVector ) . Length () / 100;
|
||
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
fSpeedIncreasingFactor = ClampDn (fSpeedIncreasingFactor , 1.0f);
|
||
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fMaxSpeed = 30.0f * fSpeedIncreasingFactor ;
|
||
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fMinSpeedRatio = 0.5f;
|
||
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fWantedSpeed = fMaxSpeed * (fMinSpeedRatio + (1 - fMinSpeedRatio ) * fSpeedDecreasingFactor );
|
||
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetDesiredTranslation (FLOAT3D (0 , 0 , - fWantedSpeed ));
|
||
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_aRotateSpeed = 75.0f * (1 + 0.5f * fSpeedDecreasingFactor );
|
||
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fDistanceFactor = (vDesiredPosition - GetPlacement () . pl_PositionVector ) . Length () / 50.0;
|
||
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
fDistanceFactor = ClampUp (fDistanceFactor , 4.0f);
|
||
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
FLOAT fRNDHeading = (FRnd () - 0.5f) * 180 * fDistanceFactor ;
|
||
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(Abs (aWantedHeading ) < 30.0f)
|
||
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetDesiredRotation (ANGLE3D (aHeading + fRNDHeading , 0 , 0));
|
||
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
else
|
||
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{
|
||
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetDesiredRotation (ANGLE3D (aHeading , 0 , 0));
|
||
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetTimerAfter(fWaitFrequency );
|
||
|
Jump(STATE_CURRENT, 0x01610002, FALSE, EBegin());return TRUE;}BOOL CLarvaOffspring::H0x01610002_LarvaOffspringGuidedSlide_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01610002
|
||
|
switch(__eeInput.ee_slEvent)
|
||
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EPass):{const EPass&epass= (EPass&)__eeInput;
|
||
|
|
||
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
BOOL bHit ;
|
||
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
bHit = epass . penOther != m_penLauncher || _pTimer -> CurrentTick () > m_fIgnoreTime ;
|
||
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
bHit &= ! IsOfClass (epass . penOther , "LarvaOffspring");
|
||
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
bHit &= ! IsOfClass (epass . penOther , "Twister");
|
||
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
if(bHit ){
|
||
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ProjectileTouch (epass . penOther );
|
||
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
return TRUE;
|
||
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}
|
||
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
return TRUE;
|
||
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EDeath):
|
||
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{const EDeath&e= (EDeath&)__eeInput;
|
||
|
|
||
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ProjectileHit ();
|
||
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
return TRUE;
|
||
|
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ETimer):
|
||
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
{const ETimer&e= (ETimer&)__eeInput;
|
||
|
|
||
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x01610003, FALSE, EInternal());return TRUE;
|
||
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}return TRUE;}BOOL CLarvaOffspring::H0x01610003_LarvaOffspringGuidedSlide_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01610003
|
||
|
Jump(STATE_CURRENT,0x01610004, FALSE, EInternal());return TRUE;
|
||
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
}BOOL CLarvaOffspring::H0x01610005_LarvaOffspringGuidedSlide_04(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01610005
|
||
|
|
||
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CLarvaOffspring::
|
||
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CLarvaOffspring_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_ELaunchLarvaOffspring, "CLarvaOffspring::Main expects 'ELaunchLarvaOffspring' as input!"); const ELaunchLarvaOffspring &eLaunch = (const ELaunchLarvaOffspring &)__eeInput;
|
||
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
ASSERT (eLaunch . penLauncher != NULL );
|
||
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_penLauncher = eLaunch . penLauncher ;
|
||
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
SetPredictable (TRUE );
|
||
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_fIgnoreTime = _pTimer -> CurrentTick () + 1.0f;
|
||
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
InitializeProjectile ();
|
||
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
m_fStartTime = _pTimer -> CurrentTick ();
|
||
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
STATE_CLarvaOffspring_LarvaOffspringGuidedSlide, TRUE;
|
||
|
Jump(STATE_CURRENT, 0x01610006, FALSE, EBegin());return TRUE;}BOOL CLarvaOffspring::H0x01610006_Main_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01610006
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CLarvaOffspring_LarvaOffspringGuidedSlide, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x01610007, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CLarvaOffspring::H0x01610007_Main_02(const CEntityEvent &__eeInput){
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01610007
|
||
|
const EEnd&__e= (EEnd&)__eeInput;
|
||
|
;
|
||
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
LarvaTailExplosion ();
|
||
|
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Destroy ();
|
||
|
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/LarvaOffspring.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};
|