mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 04:05:53 +01:00
162 lines
6.8 KiB
C++
162 lines
6.8 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
|
||
|
#include <EntitiesMP/Copier.h>
|
||
|
#include <EntitiesMP/Copier_tables.h>
|
||
|
void CCopier::SetDefaultProperties(void) {
|
||
|
m_strName = "Copier";
|
||
|
m_strDescription = "";
|
||
|
m_penTarget = NULL;
|
||
|
m_bSpawnEffect = TRUE ;
|
||
|
m_bTelefrag = TRUE ;
|
||
|
CRationalEntity::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 33 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
const CTString & CCopier::GetDescription(void)const
|
||
|
#line 34 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
{
|
||
|
#line 35 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
((CTString &) m_strDescription ) . PrintF ("-><none>");
|
||
|
#line 36 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
if(m_penTarget != NULL ){
|
||
|
#line 37 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
((CTString &) m_strDescription ) . PrintF ("->%s" , m_penTarget -> GetName ());
|
||
|
#line 38 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}
|
||
|
#line 39 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
return m_strDescription ;
|
||
|
#line 40 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}
|
||
|
|
||
|
#line 42 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
void CCopier::TeleportEntity()
|
||
|
#line 43 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
{
|
||
|
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
if(m_penTarget == NULL || (m_penTarget -> GetFlags () & ENF_DELETED )){
|
||
|
#line 47 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
return ;
|
||
|
#line 48 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}
|
||
|
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
CEntity * pen = GetWorld () -> CopyEntityInWorld (* m_penTarget ,
|
||
|
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
CPlacement3D (FLOAT3D (- 32000.0f + FRnd () * 200.0f , - 32000.0f + FRnd () * 200.0f , 0) , ANGLE3D (0 , 0 , 0)));
|
||
|
#line 54 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
CPlacement3D pl = GetPlacement ();
|
||
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
pl . pl_PositionVector += GetRotationMatrix () . GetColumn (2) * 0.05f;
|
||
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
pen -> Teleport (pl , m_bTelefrag );
|
||
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
if(m_bSpawnEffect ){
|
||
|
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
ESpawnEffect ese ;
|
||
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
ese . colMuliplier = C_WHITE | CT_OPAQUE ;
|
||
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
ese . betType = BET_TELEPORT ;
|
||
|
#line 63 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
ese . vNormal = FLOAT3D (0 , 1 , 0);
|
||
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
FLOATaabbox3D box ;
|
||
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
pen -> GetBoundingBox (box );
|
||
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
FLOAT fEntitySize = box . Size () . MaxNorm () * 2;
|
||
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
ese . vStretch = FLOAT3D (fEntitySize , fEntitySize , fEntitySize );
|
||
|
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
CEntityPointer penEffect = CreateEntity (GetPlacement () , CLASS_BASIC_EFFECT );
|
||
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
penEffect -> Initialize (ese );
|
||
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}
|
||
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}
|
||
|
|
||
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SLONG CCopier::GetUsedMemory(void)
|
||
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
{
|
||
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SLONG slUsedMemory = sizeof (CCopier ) - sizeof (CRationalEntity ) + CRationalEntity :: GetUsedMemory ();
|
||
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
slUsedMemory += m_strDescription . Length ();
|
||
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
slUsedMemory += m_strName . Length ();
|
||
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
return slUsedMemory ;
|
||
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}
|
||
|
BOOL CCopier::
|
||
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CCopier_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CCopier::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
InitAsEditorModel ();
|
||
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
||
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SetCollisionFlags (ECF_TOUCHMODEL );
|
||
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SetModel (MODEL_TELEPORT );
|
||
|
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SetModelMainTexture (TEXTURE_TELEPORT );
|
||
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
Jump(STATE_CURRENT,0x00e10004, FALSE, EInternal());return TRUE;}BOOL CCopier::H0x00e10004_Main_05(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x00e10004
|
||
|
if(!(TRUE )){ Jump(STATE_CURRENT,0x00e10005, FALSE, EInternal());return TRUE;}
|
||
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x00e10000, FALSE, EBegin());return TRUE;}BOOL CCopier::H0x00e10000_Main_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x00e10000
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_ETrigger):{const ETrigger&eTrigger= (ETrigger&)__eeInput;
|
||
|
|
||
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
if(m_penTarget != NULL ){
|
||
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
TeleportEntity ();
|
||
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}
|
||
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x00e10001, FALSE, EInternal());return TRUE;
|
||
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}ASSERT(FALSE);break;default:{
|
||
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
return TRUE;
|
||
|
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}ASSERT(FALSE);break;
|
||
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}return TRUE;}BOOL CCopier::H0x00e10001_Main_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x00e10001
|
||
|
;
|
||
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x00e10002, FALSE, EBegin());return TRUE;}BOOL CCopier::H0x00e10002_Main_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x00e10002
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00e10003, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CCopier::H0x00e10003_Main_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x00e10003
|
||
|
;Jump(STATE_CURRENT,0x00e10004, FALSE, EInternal());return TRUE;
|
||
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/Copier.es"
|
||
|
}BOOL CCopier::H0x00e10005_Main_06(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x00e10005
|
||
|
ASSERT(FALSE); return TRUE;};
|