mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 04:05:53 +01:00
730 lines
29 KiB
C++
730 lines
29 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
#include "EntitiesMP/Effector.h"
|
||
|
#include <EntitiesMP/BloodSpray.h>
|
||
|
|
||
|
#include <EntitiesMP/Effector.h>
|
||
|
#include <EntitiesMP/Effector_tables.h>
|
||
|
CEntityEvent *ESpawnEffector::MakeCopy(void) { CEntityEvent *peeCopy = new ESpawnEffector(*this); return peeCopy;}
|
||
|
ESpawnEffector::ESpawnEffector() : CEntityEvent(EVENTCODE_ESpawnEffector) {;
|
||
|
ClearToDefault(eetType);
|
||
|
ClearToDefault(vDamageDir);
|
||
|
ClearToDefault(vDestination);
|
||
|
ClearToDefault(tmLifeTime);
|
||
|
ClearToDefault(fSize);
|
||
|
ClearToDefault(ctCount);
|
||
|
ClearToDefault(penModel);
|
||
|
ClearToDefault(penModel2);
|
||
|
};
|
||
|
#line 39 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
|
||
|
void CEffector_OnPrecache(CDLLEntityClass *pdec, INDEX iUser)
|
||
|
{
|
||
|
switch ((EffectorEffectType)iUser)
|
||
|
{
|
||
|
case ET_MOVING_RING :
|
||
|
pdec->PrecacheModel(MODEL_POWER_RING);
|
||
|
pdec->PrecacheTexture(TEXTURE_POWER_RING);
|
||
|
break;
|
||
|
case ET_DESTROY_OBELISK :
|
||
|
case ET_DESTROY_PYLON :
|
||
|
case ET_HIT_GROUND :
|
||
|
case ET_LIGHTNING :
|
||
|
case ET_SIZING_BIG_BLUE_FLARE :
|
||
|
case ET_SIZING_RING_FLARE :
|
||
|
case ET_PORTAL_LIGHTNING :
|
||
|
case ET_MORPH_MODELS :
|
||
|
case ET_DISAPPEAR_MODEL :
|
||
|
case ET_APPEAR_MODEL :
|
||
|
case ET_DISAPPEAR_MODEL_NOW :
|
||
|
case ET_APPEAR_MODEL_NOW :
|
||
|
// no precaching needed
|
||
|
break;
|
||
|
default:
|
||
|
ASSERT(FALSE);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// array for model vertices in absolute space
|
||
|
CStaticStackArray<FLOAT3D> avModelFXVertices;
|
||
|
|
||
|
void CEffector::SetDefaultProperties(void) {
|
||
|
m_eetType = ET_NONE ;
|
||
|
m_tmStarted = 0.0f;
|
||
|
m_vDamageDir = FLOAT3D(0 , 0 , 0);
|
||
|
m_vFXDestination = FLOAT3D(0 , 0 , 0);
|
||
|
m_tmLifeTime = 5.0f;
|
||
|
m_fSize = 1.0f;
|
||
|
m_ctCount = 0;
|
||
|
m_bLightSource = FALSE ;
|
||
|
m_aoLightAnimation.SetData(NULL);
|
||
|
|
||
|
m_iLightAnimation = -1;
|
||
|
m_bAlive = TRUE ;
|
||
|
m_penModel = NULL;
|
||
|
m_penModel2 = NULL;
|
||
|
m_bWaitTrigger = FALSE ;
|
||
|
CMovableModelEntity::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT CEffector::CalculateLifeRatio(FLOAT fFadeInRatio,FLOAT fFadeOutRatio)
|
||
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
TIME tmDelta = _pTimer -> GetLerpedCurrentTick () - m_tmStarted ;
|
||
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLifeRatio = CalculateRatio (tmDelta , 0 , m_tmLifeTime , fFadeInRatio , fFadeOutRatio );
|
||
|
#line 110 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
return fLifeRatio ;
|
||
|
#line 111 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
|
||
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
void CEffector::AdjustMipFactor(FLOAT & fMipFactor)
|
||
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_DISAPPEAR_MODEL || m_eetType == ET_DISAPPEAR_MODEL_NOW && m_penModel != NULL )
|
||
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
CModelObject * pmo = m_penModel -> GetModelObject ();
|
||
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
TIME tmDelta = _pTimer -> GetLerpedCurrentTick () - m_tmStarted ;
|
||
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLifeRatio ;
|
||
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_tmStarted == - 1)
|
||
|
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = 1.0f;
|
||
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
else if(tmDelta >= m_tmLifeTime )
|
||
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = 0.0f;
|
||
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
else
|
||
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = CalculateLifeRatio (0.0f , 1.0f);
|
||
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
UBYTE ubAlpha = UBYTE (255.0f * fLifeRatio );
|
||
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
COLOR col = C_WHITE | ubAlpha ;
|
||
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
pmo -> mo_colBlendColor = col ;
|
||
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_APPEAR_MODEL || m_eetType == ET_APPEAR_MODEL_NOW && m_penModel != NULL )
|
||
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
CModelObject * pmo = m_penModel -> GetModelObject ();
|
||
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
TIME tmDelta = _pTimer -> GetLerpedCurrentTick () - m_tmStarted ;
|
||
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLifeRatio ;
|
||
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_tmStarted == - 1)
|
||
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = 0.0f;
|
||
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
else if(tmDelta >= m_tmLifeTime )
|
||
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = 1.0f;
|
||
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
else
|
||
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = CalculateLifeRatio (1.0f , 0.0f);
|
||
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
UBYTE ubAlpha = UBYTE (255.0f * fLifeRatio );
|
||
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
COLOR col = C_WHITE | ubAlpha ;
|
||
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
pmo -> mo_colBlendColor = col ;
|
||
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_MORPH_MODELS && m_penModel != NULL && m_penModel2 != NULL )
|
||
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
CModelObject * pmo1 = m_penModel -> GetModelObject ();
|
||
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
CModelObject * pmo2 = m_penModel2 -> GetModelObject ();
|
||
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
TIME tmDelta = _pTimer -> GetLerpedCurrentTick () - m_tmStarted ;
|
||
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLifeRatio ;
|
||
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_tmStarted == - 1)
|
||
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = 0.0f;
|
||
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
else if(tmDelta >= m_tmLifeTime )
|
||
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = 1.0f;
|
||
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
else
|
||
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fLifeRatio = CalculateLifeRatio (1.0f , 0.0f);
|
||
|
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
UBYTE ubAlpha1 = UBYTE (255.0f * (1 - fLifeRatio ));
|
||
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
UBYTE ubAlpha2 = 255 - ubAlpha1 ;
|
||
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
COLOR col1 = C_WHITE | ubAlpha1 ;
|
||
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
COLOR col2 = C_WHITE | ubAlpha2 ;
|
||
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
pmo1 -> mo_colBlendColor = col1 ;
|
||
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
pmo2 -> mo_colBlendColor = col2 ;
|
||
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
|
||
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
BOOL CEffector::AdjustShadingParameters(FLOAT3D & vLightDirection,COLOR & colLight,COLOR & colAmbient)
|
||
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_MOVING_RING )
|
||
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLifeRatio = CalculateLifeRatio (0.2f , 0.1f);
|
||
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fT = _pTimer -> CurrentTick () - m_tmStarted ;
|
||
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fPulse = 1.0f;
|
||
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
UBYTE ub = UBYTE (255.0f * fPulse * fLifeRatio );
|
||
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
COLOR col = RGBAToColor (ub , ub , ub , ub );
|
||
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
GetModelObject () -> mo_colBlendColor = col ;
|
||
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
return FALSE ;
|
||
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
|
||
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
void CEffector::RenderMovingLightnings(void)
|
||
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLifeRatio = CalculateLifeRatio (0.1f , 0.1f);
|
||
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_penModel -> GetModelVerticesAbsolute (avModelFXVertices , 0.05f , 0.0f);
|
||
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
const FLOATmatrix3D & m = m_penModel -> GetRotationMatrix ();
|
||
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D vOrigin = m_penModel -> GetPlacement () . pl_PositionVector ;
|
||
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fFXTime = 0.75f;
|
||
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fMaxHeight = 6.0f;
|
||
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fdh = 1.0f;
|
||
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT tmDelta = _pTimer -> GetLerpedCurrentTick () - m_tmStarted ;
|
||
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fY0 = tmDelta ;
|
||
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
for(FLOAT fT = tmDelta ;fT > 0;fT -= fFXTime )
|
||
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fY = fT * 2.0f;
|
||
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(fY > fMaxHeight )
|
||
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
continue ;
|
||
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fHeightRatio = CalculateRatio (fY , 0 , fMaxHeight , 0.1f , 0.0f);
|
||
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fMinY = 1e6f;
|
||
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fMinY2 = - 1e6f;
|
||
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
INDEX iLower = - 1;
|
||
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
INDEX iUpper = - 1;
|
||
|
#line 226 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
for(INDEX iVtx = 0;iVtx < avModelFXVertices . Count ();iVtx ++)
|
||
|
#line 227 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D v = (avModelFXVertices [ iVtx ] - vOrigin ) * ! m ;
|
||
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(v (2) > fY && v (2) < fMinY && v (1) < 0)
|
||
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
iLower = iVtx ;
|
||
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fMinY = v (2);
|
||
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(v (2) <= fY && v (2) > fMinY2 && v (1) < 0)
|
||
|
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
iUpper = iVtx ;
|
||
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fMinY2 = v (2);
|
||
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(iLower != - 1 && iUpper != - 1)
|
||
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D vRelHi = (avModelFXVertices [ iUpper ] - vOrigin ) * ! m ;
|
||
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D vRelLow = (avModelFXVertices [ iLower ] - vOrigin ) * ! m ;
|
||
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLerpFactor = (fY - vRelLow (2)) / (vRelHi (2) - vRelLow (2));
|
||
|
#line 247 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D vRel = Lerp (vRelLow , vRelHi , fLerpFactor );
|
||
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
vRel (2) = fY ;
|
||
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D vAbs1 = vOrigin + vRel * m ;
|
||
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
vRel (1) = - vRel (1);
|
||
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D vAbs2 = vOrigin + vRel * m ;
|
||
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Particles_Ghostbuster (vAbs1 , vAbs2 , 16 , 0.325f , fHeightRatio * fLifeRatio , 5.0f);
|
||
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
avModelFXVertices . Clear ();
|
||
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
|
||
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
void CEffector::RenderParticles(void)
|
||
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fRatio ;
|
||
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
TIME tmNow = _pTimer -> GetLerpedCurrentTick ();
|
||
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
TIME tmDelta = tmNow - m_tmStarted ;
|
||
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fLivingRatio = tmDelta / m_tmLifeTime ;
|
||
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(fLivingRatio < 0.25f){
|
||
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fRatio = Clamp (fLivingRatio / 0.25f , 0.0f , 1.0f);
|
||
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}else if(fLivingRatio > 0.75f){
|
||
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fRatio = Clamp ((- fLivingRatio + 1.0f) / 0.25f , 0.0f , 1.0f);
|
||
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}else {
|
||
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
fRatio = 1.0f;
|
||
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
switch(m_eetType )
|
||
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
case ET_DESTROY_OBELISK :
|
||
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Particles_DestroyingObelisk (this , m_tmStarted );
|
||
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
break ;
|
||
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
case ET_DESTROY_PYLON :
|
||
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Particles_DestroyingPylon (this , m_vDamageDir , m_tmStarted );
|
||
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
break ;
|
||
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
case ET_HIT_GROUND :
|
||
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Particles_HitGround (this , m_tmStarted , m_fSize );
|
||
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
break ;
|
||
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
case ET_LIGHTNING :
|
||
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Particles_Ghostbuster (GetPlacement () . pl_PositionVector , m_vFXDestination , m_ctCount , m_fSize , fRatio );
|
||
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
break ;
|
||
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
case ET_PORTAL_LIGHTNING :
|
||
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
RenderMovingLightnings ();
|
||
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
break ;
|
||
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
|
||
|
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
void CEffector::Read_t(CTStream * istr)
|
||
|
#line 297 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
CMovableModelEntity :: Read_t (istr );
|
||
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_bLightSource ){
|
||
|
#line 301 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetupLightSource ();
|
||
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
|
||
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
CLightSource * CEffector::GetLightSource(void)
|
||
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_bLightSource && ! IsPredictor ()){
|
||
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
return & m_lsLightSource ;
|
||
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}else {
|
||
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
return NULL ;
|
||
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
|
||
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
void CEffector::SetupLightSource(void)
|
||
|
#line 317 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_iLightAnimation >= 0)
|
||
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
try {
|
||
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_aoLightAnimation . SetData_t (CTFILENAME ("Animations\\Effector.ani"));
|
||
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}catch (char * strError ){
|
||
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
WarningMessage (TRANS ("Cannot load Animations\\Effector.ani: %s") , strError );
|
||
|
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_aoLightAnimation . GetData () != NULL ){
|
||
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_aoLightAnimation . PlayAnim (m_iLightAnimation , 0);
|
||
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
CLightSource lsNew ;
|
||
|
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_ulFlags = LSF_LENSFLAREONLY ;
|
||
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_rHotSpot = 0.0f;
|
||
|
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
switch(m_eetType ){
|
||
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
case ET_SIZING_RING_FLARE :
|
||
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_colColor = C_WHITE | CT_OPAQUE ;
|
||
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_rHotSpot = 100.0f;
|
||
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_rFallOff = 300.0f;
|
||
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_plftLensFlare = & _lftWhiteGlowStarNG ;
|
||
|
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
break ;
|
||
|
#line 343 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
case ET_SIZING_BIG_BLUE_FLARE :
|
||
|
#line 344 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_colColor = C_WHITE | CT_OPAQUE ;
|
||
|
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_rHotSpot = 500.0f * m_fSize ;
|
||
|
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_rFallOff = 1000.0f * m_fSize ;
|
||
|
#line 347 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_plftLensFlare = & _lftBlueStarBlueReflections ;
|
||
|
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
break ;
|
||
|
#line 350 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
default :
|
||
|
#line 351 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
ASSERTALWAYS ("Unknown light source");
|
||
|
#line 352 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 353 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_ubPolygonalMask = 0;
|
||
|
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_paoLightAnimation = NULL ;
|
||
|
#line 357 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_paoLightAnimation = NULL ;
|
||
|
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_aoLightAnimation . GetData () != NULL ){
|
||
|
#line 359 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
lsNew . ls_paoLightAnimation = & m_aoLightAnimation ;
|
||
|
#line 360 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 362 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_lsLightSource . ls_penEntity = this ;
|
||
|
#line 363 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_lsLightSource . SetLightSource (lsNew );
|
||
|
#line 364 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
BOOL CEffector::
|
||
|
#line 371 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CEffector_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_ESpawnEffector, "CEffector::Main expects 'ESpawnEffector' as input!"); const ESpawnEffector &eSpawn = (const ESpawnEffector &)__eeInput;
|
||
|
#line 374 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
InitAsEditorModel ();
|
||
|
#line 376 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_IMMATERIAL | EPF_MOVABLE );
|
||
|
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetCollisionFlags (ECF_TOUCHMODEL );
|
||
|
#line 378 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetFlags (GetFlags () | ENF_SEETHROUGH );
|
||
|
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetModel (MODEL_MARKER );
|
||
|
#line 381 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetModelMainTexture (TEXTURE_MARKER );
|
||
|
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_eetType = eSpawn . eetType ;
|
||
|
#line 385 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_vDamageDir = eSpawn . vDamageDir ;
|
||
|
#line 386 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_tmStarted = _pTimer -> CurrentTick ();
|
||
|
#line 387 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_tmLifeTime = eSpawn . tmLifeTime ;
|
||
|
#line 388 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_vFXDestination = eSpawn . vDestination ;
|
||
|
#line 389 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_fSize = eSpawn . fSize ;
|
||
|
#line 390 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_ctCount = eSpawn . ctCount ;
|
||
|
#line 391 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bAlive = TRUE ;
|
||
|
#line 392 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_penModel = eSpawn . penModel ;
|
||
|
#line 393 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_penModel2 = eSpawn . penModel2 ;
|
||
|
#line 394 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bWaitTrigger = FALSE ;
|
||
|
#line 396 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x02600001, FALSE, EBegin());return TRUE;}BOOL CEffector::H0x02600001_Main_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x02600001
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x02600002, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CEffector::H0x02600002_Main_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x02600002
|
||
|
;
|
||
|
#line 398 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_MOVING_RING )
|
||
|
#line 399 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetModel (MODEL_POWER_RING );
|
||
|
#line 401 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetModelMainTexture (TEXTURE_POWER_RING );
|
||
|
#line 402 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
en_fAcceleration = 1e6f;
|
||
|
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fSpeed = 550.0f;
|
||
|
#line 404 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetDesiredTranslation (FLOAT3D (0 , - fSpeed , 0));
|
||
|
#line 405 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fPathLen = GetPlacement () . pl_PositionVector (2) - m_vFXDestination (2);
|
||
|
#line 407 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_tmLifeTime = fPathLen / fSpeed ;
|
||
|
#line 408 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SwitchToModel ();
|
||
|
#line 409 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT fSize = 36.0f;
|
||
|
#line 410 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
FLOAT3D vStretch = FLOAT3D (fSize , fSize * 2.0f , fSize );
|
||
|
#line 411 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
GetModelObject () -> StretchModel (vStretch );
|
||
|
#line 412 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
ModelChangeNotify ();
|
||
|
#line 413 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 415 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_SIZING_RING_FLARE )
|
||
|
#line 416 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 417 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bLightSource = TRUE ;
|
||
|
#line 418 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_iLightAnimation = 0;
|
||
|
#line 419 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 420 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_SIZING_BIG_BLUE_FLARE )
|
||
|
#line 421 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 422 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bLightSource = TRUE ;
|
||
|
#line 423 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_iLightAnimation = 1;
|
||
|
#line 424 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 425 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_MORPH_MODELS || m_eetType == ET_DISAPPEAR_MODEL || m_eetType == ET_APPEAR_MODEL )
|
||
|
#line 426 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 427 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bWaitTrigger = TRUE ;
|
||
|
#line 428 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_tmStarted = - 1;
|
||
|
#line 429 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 430 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_DISAPPEAR_MODEL_NOW || m_eetType == ET_APPEAR_MODEL_NOW )
|
||
|
#line 431 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 432 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bWaitTrigger = FALSE ;
|
||
|
#line 433 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_tmStarted = _pTimer -> CurrentTick ();
|
||
|
#line 434 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 437 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_bLightSource ){SetupLightSource ();}
|
||
|
#line 439 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Jump(STATE_CURRENT,0x02600005, FALSE, EInternal());return TRUE;}BOOL CEffector::H0x02600005_Main_05(const CEntityEvent &__eeInput)
|
||
|
#line 440 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x02600005
|
||
|
if(!(_pTimer -> CurrentTick () < m_tmStarted + m_tmLifeTime && m_bAlive || m_bWaitTrigger )){ Jump(STATE_CURRENT,0x02600006, FALSE, EInternal());return TRUE;}
|
||
|
#line 441 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
SetTimerAfter(0.25f);
|
||
|
Jump(STATE_CURRENT, 0x02600003, FALSE, EBegin());return TRUE;}BOOL CEffector::H0x02600003_Main_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x02600003
|
||
|
switch(__eeInput.ee_slEvent)
|
||
|
#line 442 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETrigger):
|
||
|
#line 445 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{const ETrigger&e= (ETrigger&)__eeInput;
|
||
|
|
||
|
#line 446 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_MORPH_MODELS || m_eetType == ET_DISAPPEAR_MODEL || m_eetType == ET_APPEAR_MODEL )
|
||
|
#line 447 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 448 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_tmStarted = _pTimer -> CurrentTick ();
|
||
|
#line 449 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bWaitTrigger = FALSE ;
|
||
|
#line 451 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bAlive = TRUE ;
|
||
|
#line 452 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 453 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
return TRUE;
|
||
|
#line 454 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x02600004, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 456 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}return TRUE;}BOOL CEffector::H0x02600004_Main_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x02600004
|
||
|
|
||
|
#line 458 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(m_eetType == ET_MOVING_RING )
|
||
|
#line 459 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 460 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
if(GetPlacement () . pl_PositionVector (2) < m_vFXDestination (2))
|
||
|
#line 461 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
{
|
||
|
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
m_bAlive = FALSE ;
|
||
|
#line 463 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}
|
||
|
#line 464 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}Jump(STATE_CURRENT,0x02600005, FALSE, EInternal());return TRUE;
|
||
|
#line 465 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
}BOOL CEffector::H0x02600006_Main_06(const CEntityEvent &__eeInput) {
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x02600006
|
||
|
|
||
|
#line 467 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Destroy ();
|
||
|
#line 468 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 468 "D:/SE1_GPL/Sources/EntitiesMP/Effector.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};
|