mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 18:30:27 +01:00
109 lines
4.4 KiB
C++
109 lines
4.4 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
|
||
|
#include <EntitiesMP/MirrorMarker.h>
|
||
|
#include <EntitiesMP/MirrorMarker_tables.h>
|
||
|
void CMirrorMarker::SetDefaultProperties(void) {
|
||
|
m_wrRotation = WR_NONE ;
|
||
|
m_fRotationSpeed = 90.0f;
|
||
|
CMarker::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 34 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
const CTString & CMirrorMarker::GetMirrorName(void)
|
||
|
#line 35 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
{
|
||
|
#line 36 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
return m_strName ;
|
||
|
#line 37 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}
|
||
|
|
||
|
#line 39 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
void CMirrorMarker::GetMirror(class CMirrorParameters & mpMirror)
|
||
|
#line 40 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
{
|
||
|
#line 41 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_ulFlags = MPF_WARP ;
|
||
|
#line 42 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_plWarpIn = GetLerpedPlacement ();
|
||
|
#line 43 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
if(m_penTarget != NULL ){
|
||
|
#line 44 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_penWarpViewer = m_penTarget ;
|
||
|
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_plWarpOut = m_penTarget -> GetLerpedPlacement ();
|
||
|
#line 46 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}else {
|
||
|
#line 47 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_penWarpViewer = this ;
|
||
|
#line 48 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_plWarpOut = GetLerpedPlacement ();
|
||
|
#line 49 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}
|
||
|
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
FLOAT tmNow = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_fWarpFOV = - 1.0f;
|
||
|
#line 52 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
if(m_wrRotation == WR_BANKING ){
|
||
|
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_plWarpOut . Rotate_Airplane (ANGLE3D (0 , 0 , m_fRotationSpeed * tmNow ));
|
||
|
#line 54 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}else if(m_wrRotation == WR_TWIRLING ){
|
||
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
ANGLE3D a ;
|
||
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
a (1) = sin (tmNow * 3.9) * 5.0f;
|
||
|
#line 57 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
a (2) = sin (tmNow * 2.7) * 5.0f;
|
||
|
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
a (3) = sin (tmNow * 4.5) * 5.0f;
|
||
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_plWarpOut . Rotate_Airplane (a );
|
||
|
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
mpMirror . mp_fWarpFOV = 90.0f + sin (tmNow * 7.79f) * 5.0f;
|
||
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}
|
||
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}
|
||
|
BOOL CMirrorMarker::
|
||
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CMirrorMarker_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMirrorMarker::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
InitAsEditorModel ();
|
||
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
||
|
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
SetCollisionFlags (ECF_IMMATERIAL );
|
||
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
if(m_penTarget != NULL ){
|
||
|
#line 72 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
SetModel (MODEL_IN );
|
||
|
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
SetModelMainTexture (TEXTURE_IN );
|
||
|
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}else {
|
||
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
SetModel (MODEL_OUT );
|
||
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
SetModelMainTexture (TEXTURE_OUT );
|
||
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}
|
||
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
if(m_strName == "Marker"){
|
||
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
m_strName = "Mirror marker";
|
||
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
}
|
||
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/MirrorMarker.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};
|