mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
107 lines
4.3 KiB
C++
107 lines
4.3 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
|
|
#include "StdH.h"
|
|
|
|
#include <EntitiesMP/GravityRouter.h>
|
|
#include <EntitiesMP/GravityRouter_tables.h>
|
|
CEntityEvent *EChangeGravity::MakeCopy(void) { CEntityEvent *peeCopy = new EChangeGravity(*this); return peeCopy;}
|
|
EChangeGravity::EChangeGravity() : CEntityEvent(EVENTCODE_EChangeGravity) {;
|
|
ClearToDefault(penNewGravity);
|
|
};
|
|
void CGravityRouter::SetDefaultProperties(void) {
|
|
CMarker::SetDefaultProperties();
|
|
}
|
|
|
|
#line 28 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
const CTString & CGravityRouter::GetForceName(INDEX i)
|
|
#line 29 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
{
|
|
#line 30 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
return m_strName ;
|
|
#line 31 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
|
|
#line 34 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
void CGravityRouter::GetForce(INDEX i,const FLOAT3D & vPoint,
|
|
#line 35 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
CForceStrength & fsGravity,CForceStrength & fsField)
|
|
#line 36 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
{
|
|
#line 37 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
if((m_penTarget != NULL ) && (IsOfClass (m_penTarget , "Gravity Marker")))
|
|
#line 38 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
{
|
|
#line 39 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
m_penTarget -> GetForce (i , vPoint , fsGravity , fsField );
|
|
#line 40 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
#line 41 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
|
|
#line 43 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
CEntity * CGravityRouter::GetForceController(INDEX iForce)
|
|
#line 44 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
{
|
|
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
return this ;
|
|
#line 46 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
|
|
#line 49 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
BOOL CGravityRouter::HandleEvent(const CEntityEvent & ee)
|
|
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
{
|
|
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
if(((EChangeGravity &) ee ) . ee_slEvent == EVENTCODE_EChangeGravity )
|
|
#line 52 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
{
|
|
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
m_penTarget = ((EChangeGravity &) ee ) . penNewGravity ;
|
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
NotifyGravityChanged ();
|
|
#line 56 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
return TRUE ;
|
|
#line 57 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
return FALSE ;
|
|
#line 59 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
BOOL CGravityRouter::
|
|
#line 62 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CGravityRouter_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CGravityRouter::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 64 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
InitAsEditorModel ();
|
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL );
|
|
#line 66 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
SetCollisionFlags (ECF_IMMATERIAL );
|
|
#line 69 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
SetModel (MODEL_MARKER );
|
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
SetModelMainTexture (TEXTURE_MARKER );
|
|
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
if(m_strName == "Marker"){
|
|
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
m_strName = "Gravity Router";
|
|
#line 75 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
if(m_penTarget != NULL && ! IsOfClass (m_penTarget , "Gravity Marker")){
|
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
WarningMessage ("Entity '%s' is not of Gravity Marker class!" , m_penTarget );
|
|
#line 79 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
m_penTarget = NULL ;
|
|
#line 80 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
}
|
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/GravityRouter.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;}; |