mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 12:15:53 +01:00
164 lines
6.4 KiB
C++
164 lines
6.4 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
#include <EntitiesMP/MusicHolder.h>
|
||
|
|
||
|
#include <EntitiesMP/EnemyCounter.h>
|
||
|
#include <EntitiesMP/EnemyCounter_tables.h>
|
||
|
void CEnemyCounter::SetDefaultProperties(void) {
|
||
|
m_penMainMusicHolder = NULL;
|
||
|
m_strName = "";
|
||
|
m_iCountFrom = 100;
|
||
|
m_iCount = -1;
|
||
|
CRationalEntity::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 26 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
class CMusicHolder * CEnemyCounter::GetMusicHolder()
|
||
|
#line 27 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
{
|
||
|
#line 28 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
if(m_penMainMusicHolder == NULL ){
|
||
|
#line 29 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
m_penMainMusicHolder = _pNetwork -> GetEntityWithName ("MusicHolder" , 0);
|
||
|
#line 30 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
#line 31 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return (CMusicHolder *) & * m_penMainMusicHolder ;
|
||
|
#line 32 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
|
||
|
#line 33 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
void CEnemyCounter::StartCounting(void)
|
||
|
#line 34 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
{
|
||
|
#line 35 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
CMusicHolder * pmh = GetMusicHolder ();
|
||
|
#line 36 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
if(pmh == NULL ){
|
||
|
#line 37 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return ;
|
||
|
#line 38 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
#line 39 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
pmh -> m_penCounter = this ;
|
||
|
#line 40 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
m_iCount = m_iCountFrom ;
|
||
|
#line 41 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
|
||
|
#line 42 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
void CEnemyCounter::CountOne(void)
|
||
|
#line 43 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
{
|
||
|
#line 44 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
if(m_iCount > 0){
|
||
|
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
m_iCount -= 1;
|
||
|
#line 46 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
#line 47 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
|
||
|
#line 48 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
void CEnemyCounter::StopCounting(void)
|
||
|
#line 49 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
{
|
||
|
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
CMusicHolder * pmh = GetMusicHolder ();
|
||
|
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
if(pmh == NULL ){
|
||
|
#line 52 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return ;
|
||
|
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
#line 54 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
m_iCount = 0;
|
||
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
pmh -> m_penCounter = NULL ;
|
||
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
BOOL CEnemyCounter::
|
||
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CEnemyCounter_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnemyCounter::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
InitAsEditorModel ();
|
||
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
||
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
SetCollisionFlags (ECF_IMMATERIAL );
|
||
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
SetModel (MODEL_MARKER );
|
||
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
SetModelMainTexture (TEXTURE_MARKER );
|
||
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x01530000, FALSE, EBegin());return TRUE;}BOOL CEnemyCounter::H0x01530000_Main_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01530000
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x01530001, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEnemyCounter::H0x01530001_Main_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01530001
|
||
|
;
|
||
|
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x01530002, FALSE, EBegin());return TRUE;}BOOL CEnemyCounter::H0x01530002_Main_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01530002
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
|
||
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return TRUE;
|
||
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EStart):{const EStart&e= (EStart&)__eeInput;
|
||
|
|
||
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
StartCounting ();
|
||
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return TRUE;
|
||
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EStop):{const EStop&e= (EStop&)__eeInput;
|
||
|
|
||
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
StopCounting ();
|
||
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return TRUE;
|
||
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ETrigger):{const ETrigger&e= (ETrigger&)__eeInput;
|
||
|
|
||
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
if(m_iCount == - 1){
|
||
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
StartCounting ();
|
||
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
CountOne ();
|
||
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
if(m_iCount == 0){
|
||
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
StopCounting ();
|
||
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}
|
||
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return TRUE;
|
||
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
}return TRUE;}BOOL CEnemyCounter::H0x01530003_Main_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x01530003
|
||
|
|
||
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/EnemyCounter.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};
|