mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 04:05:53 +01:00
516 lines
21 KiB
C++
516 lines
21 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
|
|
#include "StdH.h"
|
|
#include "Models/Enemies/Gizmo/Gizmo.h"
|
|
|
|
#include <EntitiesMP/Gizmo.h>
|
|
#include <EntitiesMP/Gizmo_tables.h>
|
|
#line 12 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
|
|
// info structure
|
|
static EntityInfo eiGizmo = {
|
|
EIBT_FLESH, 100.0f,
|
|
0.0f, 1.3f, 0.0f, // source (eyes)
|
|
0.0f, 1.0f, 0.0f, // target (body)
|
|
};
|
|
|
|
#define EXPLODE_GIZMO 2.5f
|
|
|
|
void CGizmo::SetDefaultProperties(void) {
|
|
m_bExploded = FALSE ;
|
|
CEnemyBase::SetDefaultProperties();
|
|
}
|
|
CTString CGizmo::GetPlayerKillDescription(const CTString & strPlayerName,const EDeath & eDeath)
|
|
#line 48 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 49 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
CTString str ;
|
|
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
str . PrintF (TRANS ("%s ate a marsh hopper") , strPlayerName );
|
|
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
return str ;
|
|
#line 52 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
const CTFileName & CGizmo::GetComputerMessageName(void)const {
|
|
#line 54 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
static DECLARE_CTFILENAME (fnm , "Data\\Messages\\Enemies\\Gizmo.txt");
|
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
return fnm ;
|
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void * CGizmo::GetEntityInfo(void)
|
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
return & eiGizmo ;
|
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 63 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::Precache(void)
|
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
CEnemyBase :: Precache ();
|
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PrecacheSound (SOUND_SIGHT );
|
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PrecacheSound (SOUND_IDLE );
|
|
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PrecacheSound (SOUND_JUMP );
|
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PrecacheSound (SOUND_DEATH_JUMP );
|
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PrecacheClass (CLASS_BASIC_EFFECT , BET_GIZMO_SPLASH_FX );
|
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PrecacheClass (CLASS_BLOOD_SPRAY );
|
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::SightSound(void) {
|
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PlaySound (m_soSound , SOUND_SIGHT , SOF_3D );
|
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::RunningAnim(void)
|
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
StartModelAnim (GIZMO_ANIM_RUN , 0);
|
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::MortalJumpAnim(void)
|
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
StartModelAnim (GIZMO_ANIM_RUN , 0);
|
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::StandAnim(void)
|
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
StartModelAnim (GIZMO_ANIM_IDLE , AOF_LOOPING | AOF_NORESTART );
|
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::IdleSound(void) {
|
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PlaySound (m_soSound , SOUND_IDLE , SOF_3D );
|
|
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::BlowUpNotify(void) {
|
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
Explode ();
|
|
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
void CGizmo::Explode(void)
|
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
if(! m_bExploded )
|
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_bExploded = TRUE ;
|
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
CPlacement3D plSpray = GetPlacement ();
|
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
CEntity * penSpray = CreateEntity (plSpray , CLASS_BLOOD_SPRAY );
|
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
penSpray -> SetParent (this );
|
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ESpawnSpray eSpawnSpray ;
|
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
eSpawnSpray . colBurnColor = C_WHITE | CT_OPAQUE ;
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
eSpawnSpray . fDamagePower = 2.0f;
|
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
eSpawnSpray . fSizeMultiplier = 1.0f;
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
eSpawnSpray . sptType = SPT_SLIME ;
|
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
eSpawnSpray . vDirection = en_vCurrentTranslationAbsolute / 8.0f;
|
|
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
eSpawnSpray . penOwner = this ;
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
penSpray -> Initialize (eSpawnSpray );
|
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
CPlacement3D plSplash = GetPlacement ();
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
CEntityPointer penSplash = CreateEntity (plSplash , CLASS_BASIC_EFFECT );
|
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ESpawnEffect ese ;
|
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ese . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ese . betType = BET_GIZMO_SPLASH_FX ;
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
penSplash -> Initialize (ese );
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
|
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
BOOL CGizmo::ShouldBlowUp(void)
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
return TRUE ;
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
void CGizmo::LeaveStain(BOOL bGrow)
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ESpawnEffect ese ;
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT3D vPoint ;
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOATplane3D vPlaneNormal ;
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fDistanceToEdge ;
|
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOATaabbox3D box ;
|
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
GetBoundingBox (box );
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
if(GetNearestPolygon (vPoint , vPlaneNormal , fDistanceToEdge ))
|
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
if((vPoint - GetPlacement () . pl_PositionVector ) . Length () < 0.5f)
|
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fStretch = box . Size () . Length ();
|
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ese . colMuliplier = C_WHITE | CT_OPAQUE ;
|
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ese . betType = BET_GIZMOSTAIN ;
|
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ese . vStretch = FLOAT3D (fStretch * 0.75f , fStretch * 0.75f , 1.0f);
|
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ese . vNormal = FLOAT3D (vPlaneNormal );
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ese . vDirection = FLOAT3D (0 , 0 , 0);
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT3D vPos = vPoint + ese . vNormal / 50.0f * (FRnd () + 0.5f);
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
CEntityPointer penEffect = CreateEntity (CPlacement3D (vPos , ANGLE3D (0 , 0 , 0)) , CLASS_BASIC_EFFECT );
|
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
penEffect -> Initialize (ese );
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
BOOL CGizmo::
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PerformAttack(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGizmo_PerformAttack
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGizmo::PerformAttack expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
Jump(STATE_CURRENT,0x014f0005, FALSE, EInternal());return TRUE;}BOOL CGizmo::H0x014f0005_PerformAttack_05(const CEntityEvent &__eeInput)
|
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0005
|
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x014f0006, FALSE, EInternal());return TRUE;}
|
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
if(ShouldCeaseAttack ())
|
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetTargetNone ();
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
return TRUE;
|
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f));
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetDesiredRotation (ANGLE3D (0 , 0 , 0));
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fWaitTime = 0.25f + FRnd () * 0.4f;
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetTimerAfter(fWaitTime );
|
|
Jump(STATE_CURRENT, 0x014f0001, FALSE, EBegin());return TRUE;}BOOL CGizmo::H0x014f0001_PerformAttack_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0001
|
|
switch(__eeInput.ee_slEvent)
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ESound):{const ESound&e= (ESound&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EWatch):{const EWatch&e= (EWatch&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
|
UnsetTimer();Jump(STATE_CURRENT,0x014f0002, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}return TRUE;}BOOL CGizmo::H0x014f0002_PerformAttack_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0002
|
|
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
STATE_CGizmo_JumpOnce, TRUE;
|
|
Jump(STATE_CURRENT, 0x014f0003, FALSE, EBegin());return TRUE;}BOOL CGizmo::H0x014f0003_PerformAttack_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0003
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CGizmo_JumpOnce, TRUE, EVoid());return TRUE;case EVENTCODE_EReturn: Jump(STATE_CURRENT,0x014f0004, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CGizmo::H0x014f0004_PerformAttack_04(const CEntityEvent &__eeInput){
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0004
|
|
const EReturn&__e= (EReturn&)__eeInput;
|
|
;Jump(STATE_CURRENT,0x014f0005, FALSE, EInternal());return TRUE;
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}BOOL CGizmo::H0x014f0006_PerformAttack_06(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0006
|
|
ASSERT(FALSE); return TRUE;};BOOL CGizmo::
|
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
JumpOnce(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGizmo_JumpOnce
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGizmo::JumpOnce expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_vDesiredPosition = m_penEnemy -> GetPlacement () . pl_PositionVector ;
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fMoveFrequency = 0.1f;
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
if(CalcPlaneDist (m_penEnemy ) < 10.0f)
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fMoveSpeed = m_fCloseRunSpeed * 1.5f;
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_aRotateSpeed = m_aCloseRotateSpeed * 0.5f;
|
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fSpeedX = 0.0f;
|
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fSpeedY = 10.0f;
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fSpeedZ = - m_fMoveSpeed ;
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
if(! IsInFrustum (m_penEnemy , CosFast (30.0f)))
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 227 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_aRotateSpeed = m_aCloseRotateSpeed * 1.5f;
|
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
fSpeedY /= 2.0f;
|
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
fSpeedZ /= 4.0f;
|
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PlaySound (m_soSound , SOUND_JUMP , SOF_3D );
|
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
else
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PlaySound (m_soSound , SOUND_DEATH_JUMP , SOF_3D );
|
|
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT3D vTranslation (fSpeedX , fSpeedY , fSpeedZ );
|
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetDesiredTranslation (vTranslation );
|
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
MortalJumpAnim ();
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
else
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fMoveSpeed = m_fCloseRunSpeed ;
|
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_aRotateSpeed = m_aCloseRotateSpeed ;
|
|
#line 247 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fSpeedX = (FRnd () - 0.5f) * 10.0f;
|
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fSpeedY = FRnd () * 5.0f + 5.0f;
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT fSpeedZ = - m_fMoveSpeed - FRnd () * 2.5f;
|
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT3D vTranslation (fSpeedX , fSpeedY , fSpeedZ );
|
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetDesiredTranslation (vTranslation );
|
|
#line 252 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
RunningAnim ();
|
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
PlaySound (m_soSound , SOUND_JUMP , SOF_3D );
|
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
Jump(STATE_CURRENT,0x014f000a, FALSE, EInternal());return TRUE;}BOOL CGizmo::H0x014f000a_JumpOnce_03(const CEntityEvent &__eeInput)
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f000a
|
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x014f000b, FALSE, EInternal());return TRUE;}
|
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fMoveSpeed = 0.0f;
|
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_aRotateSpeed = m_aCloseRotateSpeed ;
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
FLOAT3D vTranslation = GetDesiredTranslation ();
|
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetDesiredMovement ();
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetDesiredTranslation (vTranslation );
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetTimerAfter(m_fMoveFrequency );
|
|
Jump(STATE_CURRENT, 0x014f0008, FALSE, EBegin());return TRUE;}BOOL CGizmo::H0x014f0008_JumpOnce_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0008
|
|
switch(__eeInput.ee_slEvent)
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ESound):{const ESound&e= (ESound&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EWatch):{const EWatch&e= (EWatch&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
|
UnsetTimer();Jump(STATE_CURRENT,0x014f0009, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETouch):
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{const ETouch&etouch= (ETouch&)__eeInput;
|
|
|
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
if(etouch . penOther -> GetRenderType () & RT_BRUSH )
|
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
return TRUE;
|
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
else if(IsDerivedFromClass (etouch . penOther , "Player"))
|
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
{
|
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
InflictDirectDamage (etouch . penOther , this , DMT_IMPACT , 10.0f ,
|
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
GetPlacement () . pl_PositionVector , - en_vGravityDir );
|
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetHealth (- 10000.0f);
|
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_vDamage = FLOAT3D (0 , 10000 , 0);
|
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SendEvent (EDeath ());
|
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}
|
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
return TRUE;
|
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}return TRUE;}BOOL CGizmo::H0x014f0009_JumpOnce_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f0009
|
|
Jump(STATE_CURRENT,0x014f000a, FALSE, EInternal());return TRUE;
|
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
}BOOL CGizmo::H0x014f000b_JumpOnce_04(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x014f000b
|
|
ASSERT(FALSE); return TRUE;};BOOL CGizmo::
|
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGizmo_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGizmo::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
InitAsModel ();
|
|
#line 301 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetPhysicsFlags (EPF_MODEL_WALKING | EPF_HASLUNGS );
|
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetCollisionFlags (ECF_MODEL );
|
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetFlags (GetFlags () | ENF_ALIVE );
|
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetHealth (9.5f);
|
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fMaxHealth = 9.5f;
|
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
en_tmMaxHoldBreath = 5.0f;
|
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
en_fDensity = 2000.0f;
|
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fBlowUpSize = 2.0f;
|
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetModel (MODEL_GIZMO );
|
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
SetModelMainTexture (TEXTURE_GIZMO );
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fWalkSpeed = FRnd () + 1.5f;
|
|
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_aWalkRotateSpeed = AngleDeg (FRnd () * 10.0f + 500.0f);
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fAttackRunSpeed = FRnd () * 5.0f + 15.0f;
|
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_aAttackRotateSpeed = AngleDeg (FRnd () * 100 + 600.0f);
|
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fCloseRunSpeed = FRnd () * 5.0f + 15.0f;
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_aCloseRotateSpeed = AngleDeg (360.0f);
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fAttackDistance = 400.0f;
|
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fCloseDistance = 250.0f;
|
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fStopDistance = 0.0f;
|
|
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fAttackFireTime = 2.0f;
|
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fCloseFireTime = 0.5f;
|
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fIgnoreRange = 500.0f;
|
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fBlowUpAmount = 0.0f;
|
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fBodyParts = 0;
|
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_fDamageWounded = 0.0f;
|
|
#line 331 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_iScore = 500;
|
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
m_sptType = SPT_SLIME ;
|
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
en_fDeceleration = 150.0f;
|
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
GetModelObject () -> StretchModel (FLOAT3D (1.25f , 1.25f , 1.25f));
|
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
ModelChangeNotify ();
|
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
StandingAnim ();
|
|
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/Gizmo.es"
|
|
Jump(STATE_CURRENT, STATE_CEnemyBase_MainLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;}; |