mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 18:30:27 +01:00
215 lines
8.8 KiB
C++
215 lines
8.8 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
|
|
#include "StdH.h"
|
|
|
|
#include <EntitiesMP/DevilMarker.h>
|
|
#include <EntitiesMP/DevilMarker_tables.h>
|
|
void CDevilMarker::SetDefaultProperties(void) {
|
|
m_datType = DAT_NONE ;
|
|
m_iWaitIdles = 2;
|
|
m_penDevil = NULL;
|
|
m_penTrigger = NULL;
|
|
m_penToDestroy1 = NULL;
|
|
m_penToDestroy2 = NULL;
|
|
m_fAttackRadius = 100.0f;
|
|
CMarker::SetDefaultProperties();
|
|
}
|
|
|
|
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
void CDevilMarker::SetDefaultName(void)
|
|
#line 54 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_strName = DevilActionType_enum . NameForValue (INDEX (m_datType ));
|
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
|
|
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
const CTString & CDevilMarker::GetDescription(void)const {
|
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
CTString strAction = DevilActionType_enum . NameForValue (INDEX (m_datType ));
|
|
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
if(m_penTarget == NULL ){
|
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
((CTString &) m_strDescription ) . PrintF ("%s (%s)-><none>" , m_strName , strAction );
|
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}else {
|
|
#line 63 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
((CTString &) m_strDescription ) . PrintF ("%s (%s)->%s" , m_strName , strAction ,
|
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penTarget -> GetName ());
|
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return m_strDescription ;
|
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
|
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
BOOL CDevilMarker::MovesByTargetedRoute(CTString & strTargetProperty)const {
|
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
strTargetProperty = "Target";
|
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
|
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
BOOL CDevilMarker::DropsMarker(CTFileName & fnmMarkerClass,CTString & strTargetProperty)const {
|
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
fnmMarkerClass = CTFILENAME ("Classes\\DevilMarker.ecl");
|
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
strTargetProperty = "Target";
|
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
|
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
BOOL CDevilMarker::HandleEvent(const CEntityEvent & ee)
|
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
if(ee . ee_slEvent == EVENTCODE_ETrigger )
|
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
if(m_datType == DAT_NEXT_ACTION && m_penDevil != NULL && m_penTarget != NULL )
|
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
EDevilCommand eDevilCommand ;
|
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . dctType = DC_FORCE_ACTION ;
|
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . penForcedAction = m_penTarget ;
|
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penDevil -> SendEvent (eDevilCommand );
|
|
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
else if(m_datType == DAT_GRAB_LOWER_WEAPONS && m_penDevil != NULL )
|
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
EDevilCommand eDevilCommand ;
|
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . dctType = DC_GRAB_LOWER_WEAPONS ;
|
|
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penDevil -> SendEvent (eDevilCommand );
|
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
else if(m_datType == DAT_STOP_MOVING && m_penDevil != NULL )
|
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
EDevilCommand eDevilCommand ;
|
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . dctType = DC_STOP_MOVING ;
|
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penDevil -> SendEvent (eDevilCommand );
|
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
else if(m_datType == DAT_JUMP_INTO_PYRAMID && m_penDevil != NULL )
|
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
EDevilCommand eDevilCommand ;
|
|
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . dctType = DC_JUMP_INTO_PYRAMID ;
|
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . penForcedAction = this ;
|
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penDevil -> SendEvent (eDevilCommand );
|
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
else if(m_datType == DAT_TELEPORT_INTO_PYRAMID && m_penDevil != NULL )
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
EDevilCommand eDevilCommand ;
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . dctType = DC_TELEPORT_INTO_PYRAMID ;
|
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . penForcedAction = this ;
|
|
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penDevil -> SendEvent (eDevilCommand );
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
else if(m_datType == DAT_FORCE_ATTACK_RADIUS && m_penDevil != NULL )
|
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
EDevilCommand eDevilCommand ;
|
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . dctType = DC_FORCE_ATTACK_RADIUS ;
|
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . fAttackRadius = m_fAttackRadius ;
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . vCenterOfAttack = GetPlacement () . pl_PositionVector ;
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penDevil -> SendEvent (eDevilCommand );
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
else if(m_datType == DAT_DECREASE_ATTACK_RADIUS && m_penDevil != NULL )
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
{
|
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
EDevilCommand eDevilCommand ;
|
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
eDevilCommand . dctType = DC_DECREASE_ATTACK_RADIUS ;
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
m_penDevil -> SendEvent (eDevilCommand );
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE ;
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return FALSE ;
|
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
}
|
|
BOOL CDevilMarker::
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CDevilMarker_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CDevilMarker::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
InitAsEditorModel ();
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
SetCollisionFlags (ECF_IMMATERIAL );
|
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
SetDefaultName ();
|
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
SetModel (MODEL_MARKER );
|
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
SetModelMainTexture (TEXTURE_MARKER );
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/DevilMarker.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;}; |