Serious-Engine/Sources/EntitiesMP/PyramidSpaceShipMarker.cpp

131 lines
5.9 KiB
C++
Raw Normal View History

2016-03-11 14:57:17 +01:00
/*
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
*/
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
#include "StdH.h"
#include "EntitiesMP/PyramidSpaceShip.h"
#include <EntitiesMP/PyramidSpaceShipMarker.h>
#include <EntitiesMP/PyramidSpaceShipMarker_tables.h>
void CPyramidSpaceShipMarker::SetDefaultProperties(void) {
m_fDeltaTime = 5.0f;
m_fBias = 0.0f;
m_fTension = 0.0f;
m_fContinuity = 0.0f;
m_bStopMoving = FALSE ;
m_penTrigger = NULL;
m_fRotSpeed = 0.0f;
m_penSpaceShip = NULL;
CMarker::SetDefaultProperties();
}
#line 34 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
BOOL CPyramidSpaceShipMarker::IsTargetValid(SLONG slPropertyOffset,CEntity * penTarget)
#line 35 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
{
#line 36 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
if(penTarget == NULL )
#line 37 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
{
#line 38 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
return FALSE ;
#line 39 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
#line 40 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
if(slPropertyOffset == offsetof (CPyramidSpaceShipMarker , m_penTarget ))
#line 41 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
{
#line 42 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
return (IsDerivedFromClass (penTarget , "Pyramid Space Ship Marker") ||
#line 43 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
IsDerivedFromClass (penTarget , "PyramidSpaceShip"));
#line 44 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
return TRUE ;
#line 46 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
#line 49 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
BOOL CPyramidSpaceShipMarker::DropsMarker(CTFileName & fnmMarkerClass,CTString & strTargetProperty)const
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
{
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
fnmMarkerClass = CTFILENAME ("Classes\\PyramidSpaceShipMarker.ecl");
#line 52 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
strTargetProperty = "Target";
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
return TRUE ;
#line 54 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
#line 57 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
BOOL CPyramidSpaceShipMarker::HandleEvent(const CEntityEvent & ee)
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
{
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
if(ee . ee_slEvent == EVENTCODE_ETrigger )
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
{
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
if(m_penSpaceShip != NULL && m_penTarget != NULL )
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
{
#line 63 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
EForcePathMarker eForcePathMarker ;
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
eForcePathMarker . penForcedPathMarker = m_penTarget ;
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
m_penSpaceShip -> SendEvent (eForcePathMarker );
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
return TRUE ;
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
return FALSE ;
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
BOOL CPyramidSpaceShipMarker::
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
Main(const CEntityEvent &__eeInput) {
#undef STATE_CURRENT
#define STATE_CURRENT STATE_CPyramidSpaceShipMarker_Main
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CPyramidSpaceShipMarker::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
m_fDeltaTime = ClampDn (m_fDeltaTime , 0.001f);
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
m_fBias = Clamp (m_fBias , - 1.0f , + 1.0f);
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
m_fTension = Clamp (m_fTension , - 1.0f , + 1.0f);
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
m_fContinuity = Clamp (m_fContinuity , - 1.0f , + 1.0f);
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
InitAsEditorModel ();
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
SetCollisionFlags (ECF_IMMATERIAL );
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
SetModel (MODEL_MARKER );
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
SetModelMainTexture (TEXTURE_MARKER );
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
GetModelObject () -> StretchModel (FLOAT3D (4 , 4 , 4));
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
ModelChangeNotify ();
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
if(m_penTarget != NULL && ! IsOfClass (m_penTarget , "Pyramid Space Ship Marker")){
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
WarningMessage ("Entity '%s' is not of Pyramid Space Ship Marker class!" , m_penTarget );
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
m_penTarget = NULL ;
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
}
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
Return(STATE_CURRENT,EVoid());
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/PyramidSpaceShipMarker.es"
return TRUE; ASSERT(FALSE); return TRUE;};