/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 4 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" #include "StdH.h" extern INDEX ent_bReportBrokenChains; #include #include void CTrigger::SetDefaultProperties(void) { m_strName = "Trigger"; m_penTarget1 = NULL; m_penTarget2 = NULL; m_penTarget3 = NULL; m_penTarget4 = NULL; m_penTarget5 = NULL; m_penTarget6 = NULL; m_penTarget7 = NULL; m_penTarget8 = NULL; m_penTarget9 = NULL; m_penTarget10 = NULL; m_eetEvent1 = EET_TRIGGER ; m_eetEvent2 = EET_TRIGGER ; m_eetEvent3 = EET_TRIGGER ; m_eetEvent4 = EET_TRIGGER ; m_eetEvent5 = EET_TRIGGER ; m_eetEvent6 = EET_TRIGGER ; m_eetEvent7 = EET_TRIGGER ; m_eetEvent8 = EET_TRIGGER ; m_eetEvent9 = EET_TRIGGER ; m_eetEvent10 = EET_TRIGGER ; m_strMessage = ""; m_fMessageTime = 3.0f; m_mssMessageSound = MSS_NONE ; m_fScore = 0.0f; m_fWaitTime = 0.0f; m_bAutoStart = FALSE ; m_iCount = 1; m_bUseCount = FALSE ; m_bReuseCount = FALSE ; m_bTellCount = FALSE ; m_bActive = TRUE ; m_fSendRange = 1.0f; m_eetRange = EET_IGNORE ; m_iCountTmp = 0; m_penCaused = NULL; m_ctMaxTrigs = -1; CRationalEntity::SetDefaultProperties(); } #line 67 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" CEntity * CTrigger::GetTarget(void)const #line 68 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" { #line 69 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return m_penTarget1 ; #line 70 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 74 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SLONG CTrigger::GetUsedMemory(void) #line 75 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" { #line 77 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SLONG slUsedMemory = sizeof (CTrigger ) - sizeof (CRationalEntity ) + CRationalEntity :: GetUsedMemory (); #line 79 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" slUsedMemory += m_strMessage . Length (); #line 80 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" slUsedMemory += m_strName . Length (); #line 81 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" slUsedMemory += 1 * sizeof (CSoundObject); #line 82 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return slUsedMemory ; #line 83 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } BOOL CTrigger:: #line 89 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendEventToTargets(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CTrigger_SendEventToTargets ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CTrigger::SendEventToTargets expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 91 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(!(m_fWaitTime > 0.0f)){ Jump(STATE_CURRENT,0x00cd0003, FALSE, EInternal());return TRUE;} #line 92 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetTimerAfter(m_fWaitTime ); Jump(STATE_CURRENT, 0x00cd0001, FALSE, EBegin());return TRUE;}BOOL CTrigger::H0x00cd0001_SendEventToTargets_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00cd0001 switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput; UnsetTimer();Jump(STATE_CURRENT,0x00cd0002, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EDeactivate):{const EDeactivate&e= (EDeactivate&)__eeInput; return FALSE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break; #line 97 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }return TRUE;}BOOL CTrigger::H0x00cd0002_SendEventToTargets_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd0002 Jump(STATE_CURRENT,0x00cd0003, FALSE, EInternal());return TRUE;}BOOL CTrigger::H0x00cd0003_SendEventToTargets_03(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd0003 #line 101 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget1 , m_eetEvent1 , m_penCaused ); #line 102 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget2 , m_eetEvent2 , m_penCaused ); #line 103 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget3 , m_eetEvent3 , m_penCaused ); #line 104 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget4 , m_eetEvent4 , m_penCaused ); #line 105 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget5 , m_eetEvent5 , m_penCaused ); #line 106 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget6 , m_eetEvent6 , m_penCaused ); #line 107 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget7 , m_eetEvent7 , m_penCaused ); #line 108 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget8 , m_eetEvent8 , m_penCaused ); #line 109 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget9 , m_eetEvent9 , m_penCaused ); #line 110 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (m_penTarget10 , m_eetEvent10 , m_penCaused ); #line 113 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_eetRange != EET_IGNORE ){ #line 115 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendInRange (this , m_eetRange , FLOATaabbox3D (GetPlacement () . pl_PositionVector , m_fSendRange )); #line 116 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 119 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_fScore > 0){ #line 120 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" CEntity * penCaused = FixupCausedToPlayer (this , m_penCaused ); #line 123 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(penCaused != NULL ){ #line 125 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" EReceiveScore eScore ; #line 126 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" eScore . iPoints = m_fScore ; #line 127 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" penCaused -> SendEvent (eScore ); #line 128 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" penCaused -> SendEvent (ESecretFound ()); #line 129 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 132 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_fScore = 0; #line 133 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 134 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_strMessage != ""){ #line 135 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" PrintCenterMessage (this , m_penCaused , #line 136 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" TranslateConst (m_strMessage ) , #line 137 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_fMessageTime , m_mssMessageSound ); #line 138 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 141 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_ctMaxTrigs > 0) #line 142 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" { #line 144 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_ctMaxTrigs -= 1; #line 146 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_ctMaxTrigs <= 0) #line 147 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" { #line 149 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Destroy (); #line 150 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 151 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 152 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Return(STATE_CURRENT,EVoid()); #line 152 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CTrigger:: #line 155 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Active(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CTrigger_Active ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CTrigger::Active expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 156 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" ASSERT (m_bActive ); #line 158 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_iCountTmp = m_iCount ; #line 161 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x00cd0005, FALSE, EBegin());return TRUE;}BOOL CTrigger::H0x00cd0005_Active_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00cd0005 switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput; #line 164 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_bAutoStart ){ #line 165 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Call(STATE_CURRENT, STATE_CTrigger_SendEventToTargets, TRUE, EVoid());return TRUE; #line 166 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 167 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return TRUE; #line 168 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }ASSERT(FALSE);break;case(EVENTCODE_EStart):{const EStart&eStart= (EStart&)__eeInput; #line 171 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SendToTarget (this , EET_TRIGGER , eStart . penCaused ); #line 172 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return TRUE; #line 173 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }ASSERT(FALSE);break;case(EVENTCODE_ETrigger):{const ETrigger&eTrigger= (ETrigger&)__eeInput; #line 176 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_penCaused = eTrigger . penCaused ; #line 178 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_bUseCount ){ #line 180 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_iCountTmp > 0){ #line 182 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_iCountTmp --; #line 184 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_iCountTmp < 1){ #line 185 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_bReuseCount ){ #line 186 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_iCountTmp = m_iCount ; #line 187 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }else { #line 188 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_iCountTmp = 0; #line 189 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 190 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Call(STATE_CURRENT, STATE_CTrigger_SendEventToTargets, TRUE, EVoid());return TRUE; #line 191 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }else if(m_bTellCount ){ #line 192 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" CTString strRemaining ; #line 193 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" strRemaining . PrintF (TRANS ("%d more to go...") , m_iCountTmp ); #line 194 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" PrintCenterMessage (this , m_penCaused , strRemaining , 3.0f , MSS_INFO ); #line 195 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 196 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 198 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }else { #line 199 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Call(STATE_CURRENT, STATE_CTrigger_SendEventToTargets, TRUE, EVoid());return TRUE; #line 200 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 201 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return TRUE; #line 202 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }ASSERT(FALSE);break;case(EVENTCODE_EDeactivate):{const EDeactivate&e= (EDeactivate&)__eeInput; #line 206 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_bActive = FALSE ; #line 207 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Jump(STATE_CURRENT, STATE_CTrigger_Inactive, TRUE, EVoid());return TRUE; #line 208 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 209 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }return TRUE;}BOOL CTrigger::H0x00cd0006_Active_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd0006 ASSERT(FALSE); return TRUE;};BOOL CTrigger:: #line 211 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Inactive(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CTrigger_Inactive ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CTrigger::Inactive expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 212 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" ASSERT (! m_bActive ); #line 213 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Jump(STATE_CURRENT,0x00cd000c, FALSE, EInternal());return TRUE;}BOOL CTrigger::H0x00cd000c_Inactive_05(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd000c if(!(TRUE )){ Jump(STATE_CURRENT,0x00cd000d, FALSE, EInternal());return TRUE;} #line 215 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x00cd0008, FALSE, EBegin());return TRUE;}BOOL CTrigger::H0x00cd0008_Inactive_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00cd0008 switch(__eeInput.ee_slEvent){case(EVENTCODE_EActivate):{const EActivate&e= (EActivate&)__eeInput; #line 219 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_bActive = TRUE ; #line 220 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Jump(STATE_CURRENT, STATE_CTrigger_Active, TRUE, EVoid());return TRUE; #line 221 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }ASSERT(FALSE);break;default:{ #line 223 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return TRUE; #line 224 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }ASSERT(FALSE);break; #line 225 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }return TRUE;}BOOL CTrigger::H0x00cd0009_Inactive_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd0009 ; #line 228 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetTimerAfter(0.1f); Jump(STATE_CURRENT, 0x00cd000a, FALSE, EBegin());return TRUE;}BOOL CTrigger::H0x00cd000a_Inactive_03(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00cd000a switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00cd000b, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CTrigger::H0x00cd000b_Inactive_04(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd000b ;Jump(STATE_CURRENT,0x00cd000c, FALSE, EInternal());return TRUE; #line 229 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }BOOL CTrigger::H0x00cd000d_Inactive_06(const CEntityEvent &__eeInput) { ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd000d ASSERT(FALSE); return TRUE;};BOOL CTrigger:: #line 232 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Main(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CTrigger_Main ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CTrigger::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 233 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" InitAsEditorModel (); #line 234 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetPhysicsFlags (EPF_MODEL_IMMATERIAL ); #line 235 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetCollisionFlags (ECF_IMMATERIAL ); #line 238 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetModel (MODEL_MARKER ); #line 239 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetModelMainTexture (TEXTURE_MARKER ); #line 241 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" m_fSendRange = ClampDn (m_fSendRange , 0.01f); #line 244 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" SetTimerAfter(0.1f); Jump(STATE_CURRENT, 0x00cd000e, FALSE, EBegin());return TRUE;}BOOL CTrigger::H0x00cd000e_Main_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00cd000e switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00cd000f, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CTrigger::H0x00cd000f_Main_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00cd000f ; #line 247 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" if(m_bActive ){ #line 248 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Jump(STATE_CURRENT, STATE_CTrigger_Active, TRUE, EVoid());return TRUE; #line 249 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" }else { #line 250 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Jump(STATE_CURRENT, STATE_CTrigger_Inactive, TRUE, EVoid());return TRUE; #line 251 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" } #line 254 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Destroy (); #line 256 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" Return(STATE_CURRENT,EVoid()); #line 256 "D:/SE1_GPL/Sources/EntitiesMP/Trigger.es" return TRUE; ASSERT(FALSE); return TRUE;};