mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
337 lines
17 KiB
C++
337 lines
17 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
|
|
#include "StdH.h"
|
|
#include "ModelsMP/Enemies/ExotechLarva/Charger/WallCharger.h"
|
|
|
|
#include <EntitiesMP/ExotechLarvaBattery.h>
|
|
#include <EntitiesMP/ExotechLarvaBattery_tables.h>
|
|
void CExotechLarvaBattery::SetDefaultProperties(void) {
|
|
m_bActive = TRUE ;
|
|
m_fMaxHealth = 100.0f;
|
|
m_fStretch = 1.0f;
|
|
m_fBurnTreshold = 0.0f;
|
|
m_penSpray = NULL;
|
|
m_tmSpraySpawned = 0.0f;
|
|
m_strName = "ExotechLarva Wall Battery";
|
|
m_bCustomShading = FALSE ;
|
|
m_aShadingDirection = ANGLE3D(AngleDeg (45.0f) , AngleDeg (45.0f) , AngleDeg (45.0f));
|
|
m_colLight = C_WHITE ;
|
|
m_colAmbient = C_BLACK ;
|
|
m_soSound.SetOwner(this);
|
|
m_soSound.Stop_internal();
|
|
CRationalEntity::SetDefaultProperties();
|
|
}
|
|
|
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
void CExotechLarvaBattery::Precache(void) {
|
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
CRationalEntity :: Precache ();
|
|
#line 57 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PrecacheSound (SOUND_SHUTDOWN );
|
|
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PrecacheModel (MODEL_BATTERY );
|
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PrecacheTexture (TEXTURE_BATTERY );
|
|
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PrecacheModel (MODEL_PLASMA );
|
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PrecacheTexture (TEXTURE_PLASMA );
|
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PrecacheModel (MODEL_ELECTRO );
|
|
#line 63 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PrecacheTexture (TEXTURE_ELECTRO );
|
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
|
|
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
BOOL CExotechLarvaBattery::AdjustShadingParameters(FLOAT3D & vLightDirection,COLOR & colLight,COLOR & colAmbient)
|
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
{
|
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
if(m_bCustomShading )
|
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
{
|
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
colLight = m_colLight ;
|
|
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
colAmbient = m_colAmbient ;
|
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
AnglesToDirectionVector (m_aShadingDirection , vLightDirection );
|
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
vLightDirection = - vLightDirection ;
|
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
return TRUE ;
|
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
|
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
void CExotechLarvaBattery::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
{
|
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
if(GetHealth () < 0.0f){
|
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
return ;
|
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
if((dmtType != DMT_BURNING ) && (m_tmSpraySpawned <= _pTimer -> CurrentTick () - _pTimer -> TickQuantum * 8))
|
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
{
|
|
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
CPlacement3D plSpray = CPlacement3D (vHitPoint , ANGLE3D (0 , 0 , 0));
|
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_penSpray = CreateEntity (plSpray , CLASS_BLOOD_SPRAY );
|
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_penSpray -> SetParent (this );
|
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
ESpawnSpray eSpawnSpray ;
|
|
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnSpray . colBurnColor = C_WHITE | CT_OPAQUE ;
|
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnSpray . fDamagePower = 3.0f;
|
|
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnSpray . sptType = SPT_ELECTRICITY_SPARKS_NO_BLOOD ;
|
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnSpray . fSizeMultiplier = 1.0f;
|
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnSpray . vDirection = FLOAT3D (0.0f , 1.0f , 0.0f);
|
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnSpray . penOwner = this ;
|
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_penSpray -> Initialize (eSpawnSpray );
|
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_tmSpraySpawned = _pTimer -> CurrentTick ();
|
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
FLOAT fLastHealth = GetHealth ();
|
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
CRationalEntity :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount ,
|
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
vHitPoint , vDirection );
|
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
FLOAT fNewHealth = GetHealth ();
|
|
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
if(fNewHealth <= 0.66f * m_fMaxHealth && fLastHealth > 0.66f * m_fMaxHealth ){
|
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
RemoveAttachment (WALLCHARGER_ATTACHMENT_LIGHT );
|
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
GetModelObject () -> PlayAnim (WALLCHARGER_ANIM_DAMAGE01 , AOF_SMOOTHCHANGE | AOF_NORESTART );
|
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SpawnExplosions ();
|
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}else if(fNewHealth <= 0.33 * m_fMaxHealth && fLastHealth > 0.33 * m_fMaxHealth ){
|
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
RemoveAttachment (WALLCHARGER_ATTACHMENT_PLASMA );
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
GetModelObject () -> PlayAnim (WALLCHARGER_ANIM_DAMAGE02 , AOF_SMOOTHCHANGE | AOF_NORESTART );
|
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SpawnExplosions ();
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
void CExotechLarvaBattery::RenderParticles(void)
|
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
{
|
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
FLOAT fBurnStrength ;
|
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
FLOAT fHealth = GetHealth ();
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
if(fHealth < m_fBurnTreshold ){
|
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
fBurnStrength = 1.0f - fHealth / m_fBurnTreshold ;
|
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
if(fBurnStrength > 0.99f){fBurnStrength = 0.99f;}
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Particles_Burning (this , 1.0f , fBurnStrength );
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
if(fHealth < 1.0f){
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Particles_Smoke (this , FLOAT3D (0.0f , 0.0f , 0.25f) * m_fStretch , 100 , 6.0f , 0.4f , 4.0f * m_fStretch , 2.5f);
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
|
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
void CExotechLarvaBattery::SpawnExplosions(void) {
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
CPlacement3D pl = GetPlacement ();
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
ESpawnEffect eSpawnEffect ;
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnEffect . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnEffect . betType = BET_CANNON ;
|
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
eSpawnEffect . vStretch = FLOAT3D (m_fStretch * 1.5f , m_fStretch * 1.5f , m_fStretch * 1.5f);
|
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
CEntityPointer penExplosion = CreateEntity (pl , CLASS_BASIC_EFFECT );
|
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
pl . pl_PositionVector += FLOAT3D (FRnd () * 0.5f , FRnd () * 0.5f , 0.0f);
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
penExplosion = CreateEntity (pl , CLASS_BASIC_EFFECT );
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
pl . pl_PositionVector += FLOAT3D (FRnd () * 0.5f , FRnd () * 0.5f , 0.0f);
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
penExplosion = CreateEntity (pl , CLASS_BASIC_EFFECT );
|
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
penExplosion -> Initialize (eSpawnEffect );
|
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
InflictRangeDamage (this , DMT_EXPLOSION , 25.0f , GetPlacement () . pl_PositionVector , 5.0f , 25.0f);
|
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
|
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
void CExotechLarvaBattery::AddAttachments(void) {
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , WALLCHARGER_ATTACHMENT_LIGHT , MODEL_BEAM , TEXTURE_BEAM , 0 , 0 , 0);
|
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , WALLCHARGER_ATTACHMENT_PLASMA , MODEL_PLASMA , TEXTURE_PLASMA , 0 , 0 , 0);
|
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , WALLCHARGER_ATTACHMENT_ELECTRICITY , MODEL_ELECTRO , TEXTURE_ELECTRO , 0 , 0 , 0);
|
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
AddAttachmentToModel (this , * GetModelObject () , WALLCHARGER_ATTACHMENT_ELECTRICITY2 , MODEL_ELECTRO , TEXTURE_ELECTRO , 0 , 0 , 0);
|
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
void CExotechLarvaBattery::RemoveAttachment(INDEX iAtt) {
|
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
RemoveAttachmentFromModel (* GetModelObject () , iAtt );
|
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}
|
|
BOOL CExotechLarvaBattery::
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Destroyed(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarvaBattery_Destroyed
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarvaBattery::Destroyed expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_bActive = FALSE ;
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
RemoveAttachment (WALLCHARGER_ATTACHMENT_ELECTRICITY );
|
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
RemoveAttachment (WALLCHARGER_ATTACHMENT_ELECTRICITY2 );
|
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
PlaySound (m_soSound , SOUND_SHUTDOWN , SOF_3D );
|
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
GetModelObject () -> PlayAnim (WALLCHARGER_ANIM_DAMAGE03 , AOF_SMOOTHCHANGE | AOF_NORESTART );
|
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SpawnExplosions ();
|
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Jump(STATE_CURRENT,0x015f0003, FALSE, EInternal());return TRUE;}BOOL CExotechLarvaBattery::H0x015f0003_Destroyed_03(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0003
|
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x015f0004, FALSE, EInternal());return TRUE;}
|
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetTimerAfter(1.0f);
|
|
Jump(STATE_CURRENT, 0x015f0001, FALSE, EBegin());return TRUE;}BOOL CExotechLarvaBattery::H0x015f0001_Destroyed_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0001
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015f0002, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarvaBattery::H0x015f0002_Destroyed_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0002
|
|
;Jump(STATE_CURRENT,0x015f0003, FALSE, EInternal());return TRUE;
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}BOOL CExotechLarvaBattery::H0x015f0004_Destroyed_04(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0004
|
|
|
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CExotechLarvaBattery::
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CExotechLarvaBattery_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CExotechLarvaBattery::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
InitAsModel ();
|
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetPhysicsFlags (EPF_MODEL_FIXED );
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetCollisionFlags (ECF_MODEL );
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetFlags (GetFlags () | ENF_ALIVE );
|
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetModel (MODEL_BATTERY );
|
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetModelMainTexture (TEXTURE_BATTERY );
|
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
AddAttachments ();
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
GetModelObject () -> StretchModel (FLOAT3D (m_fStretch , m_fStretch , m_fStretch ));
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
ModelChangeNotify ();
|
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetHealth (m_fMaxHealth );
|
|
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetTimerAfter(0.05f);
|
|
Jump(STATE_CURRENT, 0x015f0005, FALSE, EBegin());return TRUE;}BOOL CExotechLarvaBattery::H0x015f0005_Main_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0005
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x015f0006, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CExotechLarvaBattery::H0x015f0006_Main_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0006
|
|
;
|
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_soSound . Set3DParameters (100.0f , 50.0f , 3.5f , 1.0f);
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_bActive = TRUE ;
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
m_fBurnTreshold = 0.66f * m_fMaxHealth ;
|
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
StartModelAnim (WALLCHARGER_ANIM_DEFAULT , 0);
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x015f0007, FALSE, EBegin());return TRUE;}BOOL CExotechLarvaBattery::H0x015f0007_Main_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0007
|
|
switch(__eeInput.ee_slEvent)
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
{case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
return TRUE;
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&eDeath= (EDeath&)__eeInput;
|
|
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Jump(STATE_CURRENT, STATE_CExotechLarvaBattery_Destroyed, TRUE, EVoid());return TRUE;
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
}return TRUE;}BOOL CExotechLarvaBattery::H0x015f0008_Main_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x015f0008
|
|
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/ExotechLarvaBattery.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;}; |