/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 4 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" #include "StdH.h" #include #include void CTeleport::SetDefaultProperties(void) { m_strName = "Teleport"; m_strDescription = ""; m_penTarget = NULL; m_fWidth = 2.0f; m_fHeight = 3.0f; m_bActive = TRUE ; m_bPlayersOnly = TRUE ; m_bForceStop = FALSE ; CRationalEntity::SetDefaultProperties(); } #line 37 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" const CTString & CTeleport::GetDescription(void)const { #line 38 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ((CTString &) m_strDescription ) . PrintF ("->"); #line 39 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" if(m_penTarget != NULL ){ #line 40 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ((CTString &) m_strDescription ) . PrintF ("->%s" , m_penTarget -> GetName ()); #line 41 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } #line 42 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" return m_strDescription ; #line 43 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } #line 45 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" void CTeleport::TeleportEntity(CEntity * pen,const CPlacement3D & pl) #line 46 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" { #line 48 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" pen -> Teleport (pl ); #line 51 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ESpawnEffect ese ; #line 52 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ese . colMuliplier = C_WHITE | CT_OPAQUE ; #line 53 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ese . betType = BET_TELEPORT ; #line 54 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ese . vNormal = FLOAT3D (0 , 1 , 0); #line 55 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" FLOATaabbox3D box ; #line 56 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" pen -> GetBoundingBox (box ); #line 57 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" FLOAT fEntitySize = box . Size () . MaxNorm () * 2; #line 58 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ese . vStretch = FLOAT3D (fEntitySize , fEntitySize , fEntitySize ); #line 59 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" CEntityPointer penEffect = CreateEntity (pl , CLASS_BASIC_EFFECT ); #line 60 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" penEffect -> Initialize (ese ); #line 61 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } #line 65 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SLONG CTeleport::GetUsedMemory(void) #line 66 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" { #line 68 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SLONG slUsedMemory = sizeof (CTeleport ) - sizeof (CRationalEntity ) + CRationalEntity :: GetUsedMemory (); #line 70 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" slUsedMemory += m_strName . Length (); #line 71 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" slUsedMemory += m_strDescription . Length (); #line 72 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" return slUsedMemory ; #line 73 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } BOOL CTeleport:: #line 79 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" Main(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CTeleport_Main ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CTeleport::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 81 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" InitAsEditorModel (); #line 82 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SetPhysicsFlags (EPF_MODEL_IMMATERIAL ); #line 83 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SetCollisionFlags (ECF_TOUCHMODEL ); #line 86 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" if(m_fHeight < m_fWidth ) #line 87 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" { #line 88 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" m_fHeight = m_fWidth ; #line 89 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } #line 92 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" GetModelObject () -> StretchModel (FLOAT3D (m_fWidth , m_fHeight , m_fWidth )); #line 93 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SetModel (MODEL_TELEPORT ); #line 94 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ModelChangeNotify (); #line 95 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SetModelMainTexture (TEXTURE_TELEPORT ); #line 97 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" Jump(STATE_CURRENT,0x00db0004, FALSE, EInternal());return TRUE;}BOOL CTeleport::H0x00db0004_Main_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00db0004 if(!(TRUE )){ Jump(STATE_CURRENT,0x00db0005, FALSE, EInternal());return TRUE;} #line 99 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x00db0000, FALSE, EBegin());return TRUE;}BOOL CTeleport::H0x00db0000_Main_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00db0000 switch(__eeInput.ee_slEvent){case(EVENTCODE_EPass):{const EPass&ePass= (EPass&)__eeInput; #line 101 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" if(m_penTarget != NULL && m_bActive ){ #line 102 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" if(m_bPlayersOnly && ! IsOfClass (ePass . penOther , "Player")){ #line 103 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" return TRUE; #line 104 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } #line 105 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" TeleportEntity (ePass . penOther , m_penTarget -> GetPlacement ()); #line 106 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" if(m_bForceStop && (ePass . penOther -> GetPhysicsFlags () & EPF_MOVABLE )){ #line 107 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" ((CMovableEntity *) & * ePass . penOther ) -> ForceFullStop (); #line 108 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } #line 109 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" UnsetTimer();Jump(STATE_CURRENT,0x00db0001, FALSE, EInternal());return TRUE; #line 110 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" } #line 111 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" return TRUE; #line 112 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" }ASSERT(FALSE);break;case(EVENTCODE_EActivate):{const EActivate&e= (EActivate&)__eeInput; #line 114 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" m_bActive = TRUE ; #line 115 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" return TRUE; #line 116 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" }ASSERT(FALSE);break;case(EVENTCODE_EDeactivate):{const EDeactivate&e= (EDeactivate&)__eeInput; #line 118 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" m_bActive = FALSE ; #line 119 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" return TRUE; #line 120 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" }ASSERT(FALSE);break;default:{ #line 122 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" return TRUE; #line 123 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" }ASSERT(FALSE);break; #line 124 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" }return TRUE;}BOOL CTeleport::H0x00db0001_Main_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00db0001 ; #line 127 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" SetTimerAfter(0.1f); Jump(STATE_CURRENT, 0x00db0002, FALSE, EBegin());return TRUE;}BOOL CTeleport::H0x00db0002_Main_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00db0002 switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00db0003, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CTeleport::H0x00db0003_Main_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00db0003 ;Jump(STATE_CURRENT,0x00db0004, FALSE, EInternal());return TRUE; #line 128 "D:/SE1_GPL/Sources/EntitiesMP/Teleport.es" }BOOL CTeleport::H0x00db0005_Main_06(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00db0005 ASSERT(FALSE); return TRUE;};