mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
1417 lines
62 KiB
C++
1417 lines
62 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
|
|
#include "StdH.h"
|
|
|
|
#include <EntitiesMP/MovingBrush.h>
|
|
#include <EntitiesMP/MovingBrush_tables.h>
|
|
CEntityEvent *EHit::MakeCopy(void) { CEntityEvent *peeCopy = new EHit(*this); return peeCopy;}
|
|
EHit::EHit() : CEntityEvent(EVENTCODE_EHit) {;
|
|
};
|
|
CEntityEvent *EBrushDestroyed::MakeCopy(void) { CEntityEvent *peeCopy = new EBrushDestroyed(*this); return peeCopy;}
|
|
EBrushDestroyed::EBrushDestroyed() : CEntityEvent(EVENTCODE_EBrushDestroyed) {;
|
|
};
|
|
#line 30 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
|
|
static const float TRANSLATION_EPSILON=0.05f;
|
|
static const float ROTATION_EPSILON=0.05f;
|
|
extern void GetDefaultForce(INDEX iForce, const FLOAT3D &vPoint,
|
|
CForceStrength &fsGravity, CForceStrength &fsField);
|
|
|
|
void CMovingBrush::SetDefaultProperties(void) {
|
|
m_strName = "Moving Brush";
|
|
m_strDescription = "";
|
|
m_penTarget = NULL;
|
|
m_bAutoStart = FALSE ;
|
|
m_fSpeed = 1.0f;
|
|
m_fWaitTime = 0.0f;
|
|
m_bMoveOnTouch = FALSE ;
|
|
m_ebaAction = BA_NONE ;
|
|
m_fBlockDamage = 10.0f;
|
|
m_bPlayersOnly = TRUE ;
|
|
m_bDynamicShadows = FALSE ;
|
|
m_bVeryBigBrush = FALSE ;
|
|
m_eetTouchEvent = EET_IGNORE ;
|
|
m_penTouchEvent = NULL;
|
|
m_tdeSendEventOnDamage = TDE_TOUCHONLY ;
|
|
m_penSwitch = NULL;
|
|
m_eetMarkerEvent = EET_IGNORE ;
|
|
m_penMarkerEvent = NULL;
|
|
m_tmBankingRotation = 0.0f;
|
|
m_bMoving = FALSE ;
|
|
m_bRotating = FALSE ;
|
|
m_bForceStop = FALSE ;
|
|
m_bNoRotation = FALSE ;
|
|
m_vDesiredTranslation = FLOAT3D(0 , 0 , 0);
|
|
m_aDesiredRotation = FLOAT3D(0 , 0 , 0);
|
|
m_bInverseRotate = FALSE ;
|
|
m_bStopMoving = FALSE ;
|
|
m_bMoveToMarker = FALSE ;
|
|
m_bSkipMarker = FALSE ;
|
|
m_bValidMarker = FALSE ;
|
|
m_fXLimitSign = 0.0f;
|
|
m_fYLimitSign = 0.0f;
|
|
m_fZLimitSign = 0.0f;
|
|
m_aHLimitSign = 0.0f;
|
|
m_aPLimitSign = 0.0f;
|
|
m_aBLimitSign = 0.0f;
|
|
m_vStartTranslation = FLOAT3D(0 , 0 , 0);
|
|
m_aStartRotation = ANGLE3D(0 , 0 , 0);
|
|
m_fCourseLength = 0.0f;
|
|
m_aHeadLenght = 0.0f;
|
|
m_aPitchLenght = 0.0f;
|
|
m_aBankLenght = 0.0f;
|
|
m_penSoundStart = NULL;
|
|
m_penSoundStop = NULL;
|
|
m_penSoundFollow = NULL;
|
|
m_soStart.SetOwner(this);
|
|
m_soStart.Stop_internal();
|
|
m_soStop.SetOwner(this);
|
|
m_soStop.Stop_internal();
|
|
m_soFollow.SetOwner(this);
|
|
m_soFollow.Stop_internal();
|
|
m_penMirror0 = NULL;
|
|
m_penMirror1 = NULL;
|
|
m_penMirror2 = NULL;
|
|
m_penMirror3 = NULL;
|
|
m_penMirror4 = NULL;
|
|
m_fHealth = -1.0f;
|
|
m_bBlowupByBull = FALSE ;
|
|
m_eetBlowupEvent = EET_IGNORE ;
|
|
m_penBlowupEvent = NULL;
|
|
m_bZoning = FALSE ;
|
|
m_bMoveOnDamage = FALSE ;
|
|
m_fTouchDamage = 0.0f;
|
|
m_colDebrises = C_WHITE ;
|
|
m_ctDebrises = 12;
|
|
m_fCandyEffect = 0.0f;
|
|
m_fCubeFactor = 1.0f;
|
|
m_bBlowupByDamager = FALSE ;
|
|
m_cbClassificationBits = 0;
|
|
m_vbVisibilityBits = 0;
|
|
CMovableBrushEntity::SetDefaultProperties();
|
|
}
|
|
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ULONG CMovingBrush::GetVisTweaks(void)
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return m_cbClassificationBits | m_vbVisibilityBits ;
|
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::Precache(void)
|
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PrecacheClass (CLASS_DEBRIS );
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PrecacheModel (MODEL_STONE );
|
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PrecacheTexture (TEXTURE_STONE );
|
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::GetForce(INDEX iForce,const FLOAT3D & vPoint,
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CForceStrength & fsGravity,CForceStrength & fsField)
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
GetDefaultForce (iForce , vPoint , fsGravity , fsField );
|
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::ReceiveDamage(CEntity * penInflictor,enum DamageType dmtType,
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT fDamageAmmount,const FLOAT3D & vHitPoint,const FLOAT3D & vDirection)
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bMoveOnDamage )
|
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
EHit eHit ;
|
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SendEvent (eHit );
|
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return ;
|
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_tdeSendEventOnDamage != TDE_TOUCHONLY && CanReactOnEntity (penInflictor )){
|
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SendToTarget (m_penTouchEvent , m_eetTouchEvent , penInflictor );
|
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_fHealth < 0){
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return ;
|
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 186 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bBlowupByBull )
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(dmtType == DMT_IMPACT && IsOfClass (penInflictor , "Werebull"))
|
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMovableBrushEntity :: ReceiveDamage (penInflictor , dmtType , m_fHealth * 2 , vHitPoint , vDirection );
|
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
((CLiveEntity *) penInflictor ) -> SetHealth (0.0f);
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
InflictDirectDamage (penInflictor , this , DMT_IMPACT , 1.0f ,
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
GetPlacement () . pl_PositionVector , FLOAT3D (0 , 1 , 0));
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
else if(m_bBlowupByDamager )
|
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(dmtType == DMT_DAMAGER )
|
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMovableBrushEntity :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
else
|
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if((dmtType == DMT_EXPLOSION ) ||
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
(dmtType == DMT_PROJECTILE ) ||
|
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
(dmtType == DMT_CANNONBALL ))
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMovableBrushEntity :: ReceiveDamage (penInflictor , dmtType , fDamageAmmount , vHitPoint , vDirection );
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::AdjustAngle(ANGLE & a) {
|
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bInverseRotate ){
|
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(a > 0){a = a - 360;}
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
else if(a < 0){a = 360 + a ;}
|
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 228 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
BOOL CMovingBrush::MovesByTargetedRoute(CTString & strTargetProperty)const {
|
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
strTargetProperty = "Target";
|
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE ;
|
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
BOOL CMovingBrush::DropsMarker(CTFileName & fnmMarkerClass,CTString & strTargetProperty)const {
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
fnmMarkerClass = CTFILENAME ("Classes\\MovingBrushMarker.ecl");
|
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
strTargetProperty = "Target";
|
|
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE ;
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const CTString & CMovingBrush::GetDescription(void)const {
|
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
((CTString &) m_strDescription ) . PrintF ("-><none>");
|
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_penTarget != NULL ){
|
|
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
((CTString &) m_strDescription ) . PrintF ("->%s" , m_penTarget -> GetName ());
|
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return m_strDescription ;
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const CTString & CMovingBrush::GetMirrorName(INDEX iMirror)
|
|
#line 247 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
static const CTString strDummyName ("");
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
static const CTString strMarkerUnused ("Marker not set");
|
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(iMirror == 0){
|
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return strDummyName ;
|
|
#line 252 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
switch(iMirror ){
|
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 1: {static const CTString str ("std mirror 1");return str ;};break ;
|
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 2: {static const CTString str ("std mirror 2");return str ;};break ;
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 3: {static const CTString str ("std mirror 3");return str ;};break ;
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 4: {static const CTString str ("std mirror 4");return str ;};break ;
|
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 5: {static const CTString str ("std mirror 5");return str ;};break ;
|
|
#line 260 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 6: {static const CTString str ("std mirror 6");return str ;};break ;
|
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 7: {static const CTString str ("std mirror 7");return str ;};break ;
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
case 8: {static const CTString str ("std mirror 8");return str ;};break ;
|
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
default :{
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
iMirror -= 9;
|
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
INDEX ctMirrorMarkers = & m_penMirror4 - & m_penMirror0 ;
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(iMirror < ctMirrorMarkers ){
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMirrorMarker * pfm = (CMirrorMarker *) & * (& m_penMirror0 ) [ iMirror ];
|
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(pfm != NULL ){
|
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return pfm -> GetMirrorName ();
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else {
|
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return strMarkerUnused ;
|
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return strDummyName ;
|
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
BOOL CMovingBrush::GetMirror(INDEX iMirror,class CMirrorParameters & mpMirror)
|
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 282 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(iMirror == 0){
|
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 284 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(iMirror >= 1 && iMirror <= 8){
|
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
mpMirror . mp_ulFlags = 0;
|
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE ;
|
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
iMirror -= 9;
|
|
#line 290 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
INDEX ctMirrorMarkers = & m_penMirror4 - & m_penMirror0 ;
|
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(iMirror < ctMirrorMarkers ){
|
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMirrorMarker * pmm = (CMirrorMarker *) & * (& m_penMirror0 ) [ iMirror ];
|
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(pmm != NULL ){
|
|
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
pmm -> GetMirror (mpMirror );
|
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE ;
|
|
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 297 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 298 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 299 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::PreMoving() {
|
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bMoveToMarker ){
|
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const FLOAT3D & vTarget = m_penTarget -> GetPlacement () . pl_PositionVector ;
|
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const ANGLE3D & aTarget = m_penTarget -> GetPlacement () . pl_OrientationAngle ;
|
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const FLOAT3D & vSource = GetPlacement () . pl_PositionVector ;
|
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const ANGLE3D & aSource = GetPlacement () . pl_OrientationAngle ;
|
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT3D vSpeed = (vTarget - vSource ) / _pTimer -> TickQuantum ;
|
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(Abs (vSpeed (1)) < TRANSLATION_EPSILON ){
|
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
vSpeed (1) = 0.0f;
|
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if((vSpeed (1) - m_vDesiredTranslation (1)) * m_fXLimitSign > 0){
|
|
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
vSpeed (1) = m_vDesiredTranslation (1);
|
|
#line 316 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(Abs (vSpeed (2)) < TRANSLATION_EPSILON ){
|
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
vSpeed (2) = 0.0f;
|
|
#line 320 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if((vSpeed (2) - m_vDesiredTranslation (2)) * m_fYLimitSign > 0){
|
|
#line 321 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
vSpeed (2) = m_vDesiredTranslation (2);
|
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 324 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(Abs (vSpeed (3)) < TRANSLATION_EPSILON ){
|
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
vSpeed (3) = 0.0f;
|
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if((vSpeed (3) - m_vDesiredTranslation (3)) * m_fZLimitSign > 0){
|
|
#line 327 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
vSpeed (3) = m_vDesiredTranslation (3);
|
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 331 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ANGLE3D aSpeed ;
|
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (1) = NormalizeAngle (aTarget (1) - aSource (1));
|
|
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
AdjustAngle (aSpeed (1));
|
|
#line 334 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (1) = Abs (aSpeed (1)) * m_aHLimitSign ;
|
|
#line 335 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (1) /= _pTimer -> TickQuantum ;
|
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (2) = NormalizeAngle (aTarget (2) - aSource (2));
|
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
AdjustAngle (aSpeed (2));
|
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (2) = Abs (aSpeed (2)) * m_aPLimitSign ;
|
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (2) /= _pTimer -> TickQuantum ;
|
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (3) = NormalizeAngle (aTarget (3) - aSource (3));
|
|
#line 341 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
AdjustAngle (aSpeed (3));
|
|
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (3) = Abs (aSpeed (3)) * m_aBLimitSign ;
|
|
#line 343 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (3) /= _pTimer -> TickQuantum ;
|
|
#line 345 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(Abs (aSpeed (1)) < ROTATION_EPSILON ){
|
|
#line 346 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (1) = 0.0f;
|
|
#line 347 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if((aSpeed (1) - m_aDesiredRotation (1)) * m_aHLimitSign > 0){
|
|
#line 348 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (1) = m_aDesiredRotation (1);
|
|
#line 349 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 351 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(Abs (aSpeed (2)) < ROTATION_EPSILON ){
|
|
#line 352 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (2) = 0.0f;
|
|
#line 353 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if((aSpeed (2) - m_aDesiredRotation (2)) * m_aPLimitSign > 0){
|
|
#line 354 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (2) = m_aDesiredRotation (2);
|
|
#line 355 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 357 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(Abs (aSpeed (3)) < ROTATION_EPSILON ){
|
|
#line 358 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (3) = 0.0f;
|
|
#line 359 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if((aSpeed (3) - m_aDesiredRotation (3)) * m_aBLimitSign > 0){
|
|
#line 360 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aSpeed (3) = m_aDesiredRotation (3);
|
|
#line 361 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 364 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(vSpeed (1) == 0.0f && vSpeed (2) == 0.0f && vSpeed (3) == 0.0f
|
|
#line 365 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
&& ((m_tmBankingRotation != 0 || m_bNoRotation ) || (aSpeed (1) == 0.0f && aSpeed (2) == 0.0f && aSpeed (3) == 0.0f)))
|
|
#line 366 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 368 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ForceFullStop ();
|
|
#line 370 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoveToMarker = FALSE ;
|
|
#line 372 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SendEvent (EEnd ());
|
|
#line 375 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else {
|
|
#line 376 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredTranslation (vSpeed );
|
|
#line 377 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bRotating ){
|
|
#line 378 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 379 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if(! m_tmBankingRotation && ! m_bNoRotation ){
|
|
#line 380 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (aSpeed );
|
|
#line 381 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else {
|
|
#line 382 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (ANGLE3D (0 , 0 , 0));
|
|
#line 383 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 384 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 386 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 387 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMovableBrushEntity :: PreMoving ();
|
|
#line 388 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 392 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
BOOL CMovingBrush::LoadMarkerParameters() {
|
|
#line 393 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_penTarget == NULL ){
|
|
#line 394 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 395 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 397 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! IsOfClass (m_penTarget , "Moving Brush Marker")){
|
|
#line 398 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
WarningMessage ("Entity '%s' is not of Moving Brush Marker class!" , m_penTarget -> GetName ());
|
|
#line 399 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 400 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 402 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMovingBrushMarker & mbm = (CMovingBrushMarker &) * m_penTarget ;
|
|
#line 403 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_penTarget == NULL ){
|
|
#line 404 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 405 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 408 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_fSpeed > 0.0f){m_fSpeed = mbm . m_fSpeed ;}
|
|
#line 411 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_fWaitTime >= 0.0f){m_fWaitTime = mbm . m_fWaitTime ;}
|
|
#line 414 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bInverseRotate = mbm . m_bInverseRotate ;
|
|
#line 417 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetBoolFromBoolEType (m_bMoveOnTouch , mbm . m_betMoveOnTouch );
|
|
#line 420 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bStopMoving = mbm . m_bStopMoving ;
|
|
#line 423 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_fBlockDamage >= 0.0f){
|
|
#line 424 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_fBlockDamage = mbm . m_fBlockDamage ;
|
|
#line 425 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 428 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_penTouchEvent != NULL ){
|
|
#line 429 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_penTouchEvent = mbm . m_penTouchEvent ;
|
|
#line 430 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_eetTouchEvent = mbm . m_eetTouchEvent ;
|
|
#line 431 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 434 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SendToTarget (mbm . m_penMarkerEvent , mbm . m_eetMarkerEvent );
|
|
#line 437 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_penSoundStart != NULL ){
|
|
#line 438 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_penSoundStart = mbm . m_penSoundStart ;
|
|
#line 439 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 440 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_penSoundStop != NULL ){
|
|
#line 441 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_penSoundStop = mbm . m_penSoundStop ;
|
|
#line 442 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 443 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_penSoundFollow != NULL ){
|
|
#line 444 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_penSoundFollow = mbm . m_penSoundFollow ;
|
|
#line 445 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 447 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bNoRotation = mbm . m_bNoRotation ;
|
|
#line 449 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(mbm . m_tmBankingRotation >= 0.0f){
|
|
#line 450 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_tmBankingRotation = mbm . m_tmBankingRotation ;
|
|
#line 451 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! mbm . m_bBankingClockwise ){
|
|
#line 452 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_tmBankingRotation *= - 1;
|
|
#line 453 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 454 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 456 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE ;
|
|
#line 457 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 461 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
BOOL CMovingBrush::CanReactOnEntity(CEntity * pen)
|
|
#line 462 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 463 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(pen == NULL ){
|
|
#line 464 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 465 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 467 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! (pen -> GetFlags () & ENF_ALIVE )){
|
|
#line 468 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 469 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 471 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bPlayersOnly && ! IsDerivedFromClass (pen , "Player")){
|
|
#line 472 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return FALSE ;
|
|
#line 473 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 475 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE ;
|
|
#line 476 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 479 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::PlayStartSound(void) {
|
|
#line 481 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_penSoundStart != NULL ){
|
|
#line 482 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CSoundHolder & sh = (CSoundHolder &) * m_penSoundStart ;
|
|
#line 483 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_soStart . Set3DParameters (FLOAT (sh . m_rFallOffRange ) , FLOAT (sh . m_rHotSpotRange ) , sh . m_fVolume , 1.0f);
|
|
#line 484 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PlaySound (m_soStart , sh . m_fnSound , sh . m_iPlayType );
|
|
#line 485 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 486 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 489 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::PlayStopSound(void) {
|
|
#line 491 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_penSoundStop != NULL ){
|
|
#line 492 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CSoundHolder & sh = (CSoundHolder &) * m_penSoundStop ;
|
|
#line 493 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_soStop . Set3DParameters (FLOAT (sh . m_rFallOffRange ) , FLOAT (sh . m_rHotSpotRange ) , sh . m_fVolume , 1.0f);
|
|
#line 494 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PlaySound (m_soStop , sh . m_fnSound , sh . m_iPlayType );
|
|
#line 495 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 496 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 499 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::PlayFollowSound(void) {
|
|
#line 501 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_penSoundFollow != NULL ){
|
|
#line 502 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CSoundHolder & sh = (CSoundHolder &) * m_penSoundFollow ;
|
|
#line 503 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_soFollow . Set3DParameters (FLOAT (sh . m_rFallOffRange ) , FLOAT (sh . m_rHotSpotRange ) , sh . m_fVolume , 1.0f);
|
|
#line 504 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PlaySound (m_soFollow , sh . m_fnSound , sh . m_iPlayType );
|
|
#line 505 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 506 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 509 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::StopFollowSound(void) {
|
|
#line 510 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_soFollow . Stop ();
|
|
#line 511 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 514 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::MovingOn(void)
|
|
#line 515 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 516 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bMoving ){
|
|
#line 517 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return ;
|
|
#line 518 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 519 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bVeryBigBrush ){
|
|
#line 520 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetCollisionFlags (ECF_BRUSH | ECF_IGNOREMODELS );
|
|
#line 521 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 522 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoving = TRUE ;
|
|
#line 523 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 524 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::MovingOff(void)
|
|
#line 525 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 526 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bMoving ){
|
|
#line 527 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return ;
|
|
#line 528 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 529 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bVeryBigBrush ){
|
|
#line 530 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetCollisionFlags (ECF_BRUSH );
|
|
#line 531 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 532 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoving = FALSE ;
|
|
#line 533 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 535 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::MaybeActivateRotation(void)
|
|
#line 536 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 537 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_tmBankingRotation != 0){
|
|
#line 538 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bRotating = TRUE ;
|
|
#line 539 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 360.0f / m_tmBankingRotation ));
|
|
#line 540 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 541 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
else {
|
|
#line 542 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bRotating = FALSE ;
|
|
#line 543 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 544 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 546 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::DeactivateRotation(void)
|
|
#line 547 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 548 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bRotating = FALSE ;
|
|
#line 549 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 550 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 552 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
void CMovingBrush::SetCombinedRotation(ANGLE3D aRotAngle,ANGLE3D aAddAngle)
|
|
#line 553 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 554 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aRotAngle (1) += aAddAngle (1);
|
|
#line 555 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aRotAngle (2) += aAddAngle (2);
|
|
#line 556 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aRotAngle (3) += aAddAngle (3);
|
|
#line 557 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
|
|
#line 561 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SLONG CMovingBrush::GetUsedMemory(void)
|
|
#line 562 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 564 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SLONG slUsedMemory = sizeof (CMovingBrush ) - sizeof (CMovableBrushEntity ) + CMovableBrushEntity :: GetUsedMemory ();
|
|
#line 566 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
slUsedMemory += m_strName . Length ();
|
|
#line 567 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
slUsedMemory += m_strDescription . Length ();
|
|
#line 568 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
slUsedMemory += 3 * sizeof (CSoundObject);
|
|
#line 569 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return slUsedMemory ;
|
|
#line 570 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
BOOL CMovingBrush::
|
|
#line 577 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MoveToMarker(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CMovingBrush_MoveToMarker
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMovingBrush::MoveToMarker expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 579 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const FLOAT3D & vTarget = m_penTarget -> GetPlacement () . pl_PositionVector ;
|
|
#line 580 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const ANGLE3D & aTarget = m_penTarget -> GetPlacement () . pl_OrientationAngle ;
|
|
#line 581 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const FLOAT3D & vSource = GetPlacement () . pl_PositionVector ;
|
|
#line 582 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
const ANGLE3D & aSource = GetPlacement () . pl_OrientationAngle ;
|
|
#line 585 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_vDesiredTranslation = (vTarget - vSource ) / m_fSpeed ;
|
|
#line 586 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_fXLimitSign = Sgn (vTarget (1) - vSource (1));
|
|
#line 587 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_fYLimitSign = Sgn (vTarget (2) - vSource (2));
|
|
#line 588 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_fZLimitSign = Sgn (vTarget (3) - vSource (3));
|
|
#line 592 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ANGLE aDelta = NormalizeAngle (aTarget (1) - aSource (1));
|
|
#line 593 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
AdjustAngle (aDelta );
|
|
#line 594 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_aDesiredRotation (1) = aDelta / m_fSpeed ;
|
|
#line 595 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_aHLimitSign = Sgn (aDelta );
|
|
#line 597 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aDelta = NormalizeAngle (aTarget (2) - aSource (2));
|
|
#line 598 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
AdjustAngle (aDelta );
|
|
#line 599 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_aDesiredRotation (2) = aDelta / m_fSpeed ;
|
|
#line 600 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_aPLimitSign = Sgn (aDelta );
|
|
#line 602 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
aDelta = NormalizeAngle (aTarget (3) - aSource (3));
|
|
#line 603 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
AdjustAngle (aDelta );
|
|
#line 604 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_aDesiredRotation (3) = aDelta / m_fSpeed ;
|
|
#line 605 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_aBLimitSign = Sgn (aDelta );
|
|
#line 608 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoveToMarker = TRUE ;
|
|
#line 609 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredTranslation (m_vDesiredTranslation );
|
|
#line 610 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bRotating ){
|
|
#line 611 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 612 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if(! m_tmBankingRotation ){
|
|
#line 613 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (m_aDesiredRotation );
|
|
#line 614 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 617 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x00650003, FALSE, EBegin());return TRUE;}BOOL CMovingBrush::H0x00650003_MoveToMarker_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650003
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EStop):{const EStop&e= (EStop&)__eeInput;
|
|
|
|
#line 621 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f));
|
|
#line 622 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_tmBankingRotation == 0){
|
|
#line 623 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 624 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 625 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bForceStop = TRUE ;
|
|
#line 627 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoveToMarker = FALSE ;
|
|
#line 628 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bStopMoving = TRUE ;
|
|
#line 630 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EEnd ());
|
|
#line 630 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 631 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EBlock):{const EBlock&eBlock= (EBlock&)__eeInput;
|
|
|
|
#line 635 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
InflictDirectDamage (eBlock . penOther , this , DMT_BRUSH , m_fBlockDamage ,
|
|
#line 636 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT3D (0.0f , 0.0f , 0.0f) , (FLOAT3D &) eBlock . plCollision );
|
|
#line 637 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_ebaAction == BA_BOUNCE ){
|
|
#line 639 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredTranslation (- m_vDesiredTranslation );
|
|
#line 640 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bRotating ){
|
|
#line 641 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 642 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if(! m_tmBankingRotation ){
|
|
#line 643 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (- m_aDesiredRotation );
|
|
#line 644 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 646 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_BounceObstructed, TRUE, EVoid());return TRUE;
|
|
#line 647 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if(m_ebaAction == BA_SKIPMARKER ){
|
|
#line 649 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ForceFullStop ();
|
|
#line 651 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoveToMarker = FALSE ;
|
|
#line 653 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bSkipMarker = TRUE ;
|
|
#line 654 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EEnd ());
|
|
#line 654 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 655 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 656 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 657 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 658 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}return TRUE;}BOOL CMovingBrush::H0x00650004_MoveToMarker_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650004
|
|
ASSERT(FALSE); return TRUE;};BOOL CMovingBrush::
|
|
#line 661 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
BounceObstructed(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CMovingBrush_BounceObstructed
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMovingBrush::BounceObstructed expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 662 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetTimerAfter(0.2f);
|
|
Jump(STATE_CURRENT, 0x00650006, FALSE, EBegin());return TRUE;}BOOL CMovingBrush::H0x00650006_BounceObstructed_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650006
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00650007, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CMovingBrush::H0x00650007_BounceObstructed_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650007
|
|
;
|
|
#line 664 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredTranslation (m_vDesiredTranslation );
|
|
#line 665 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bRotating ){
|
|
#line 666 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 360.0f / m_tmBankingRotation ));
|
|
#line 667 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if(! m_tmBankingRotation ){
|
|
#line 668 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (m_aDesiredRotation );
|
|
#line 669 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 670 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 670 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CMovingBrush::
|
|
#line 710 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MoveBrush(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CMovingBrush_MoveBrush
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMovingBrush::MoveBrush expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 712 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_penTarget == NULL ){
|
|
#line 713 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MovingOff ();
|
|
#line 714 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 714 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 715 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 717 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MovingOn ();
|
|
#line 720 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Jump(STATE_CURRENT,0x00650011, FALSE, EInternal());return TRUE;}BOOL CMovingBrush::H0x00650011_MoveBrush_09(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650011
|
|
|
|
#line 722 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bForceStop == FALSE )
|
|
#line 723 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 725 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_penTarget = m_penTarget -> GetTarget ();
|
|
#line 726 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 727 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
else {
|
|
#line 728 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bForceStop = FALSE ;
|
|
#line 729 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 731 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_penTarget == NULL ){
|
|
#line 732 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MovingOff ();
|
|
#line 733 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EVoid ());
|
|
#line 733 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 734 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 737 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(!(m_bSkipMarker )){ Jump(STATE_CURRENT,0x0065000d, FALSE, EInternal());return TRUE;}
|
|
#line 738 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bSkipMarker = FALSE ;Jump(STATE_CURRENT,0x0065000c, FALSE, EInternal());return TRUE;}BOOL CMovingBrush::H0x0065000d_MoveBrush_05(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0065000d
|
|
if(!(m_fWaitTime > 0.0f)){ Jump(STATE_CURRENT,0x0065000b, FALSE, EInternal());return TRUE;}
|
|
#line 742 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetTimerAfter(m_fWaitTime );
|
|
Jump(STATE_CURRENT, 0x00650009, FALSE, EBegin());return TRUE;}BOOL CMovingBrush::H0x00650009_MoveBrush_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650009
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EStop):{const EStop&e= (EStop&)__eeInput;
|
|
|
|
#line 746 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredTranslation (FLOAT3D (0.0f , 0.0f , 0.0f));
|
|
#line 747 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_tmBankingRotation == 0){
|
|
#line 748 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (ANGLE3D (0.0f , 0.0f , 0.0f));
|
|
#line 749 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 750 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bForceStop = TRUE ;
|
|
#line 752 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoveToMarker = FALSE ;
|
|
#line 753 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bStopMoving = TRUE ;
|
|
#line 755 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
|
UnsetTimer();Jump(STATE_CURRENT,0x0065000a, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 757 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}return TRUE;}BOOL CMovingBrush::H0x0065000a_MoveBrush_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0065000a
|
|
Jump(STATE_CURRENT,0x0065000b, FALSE, EInternal());return TRUE;}BOOL CMovingBrush::H0x0065000b_MoveBrush_03(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0065000b
|
|
Jump(STATE_CURRENT,0x0065000c, FALSE, EInternal());return TRUE;}
|
|
BOOL CMovingBrush::H0x0065000c_MoveBrush_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0065000c
|
|
|
|
#line 760 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(!(! m_bForceStop )){ Jump(STATE_CURRENT,0x00650010, FALSE, EInternal());return TRUE;}
|
|
#line 761 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 763 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PlayStartSound ();
|
|
#line 764 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PlayFollowSound ();
|
|
#line 765 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
STATE_CMovingBrush_MoveToMarker, TRUE;
|
|
Jump(STATE_CURRENT, 0x0065000e, FALSE, EBegin());return TRUE;}BOOL CMovingBrush::H0x0065000e_MoveBrush_06(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0065000e
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: Call(STATE_CURRENT, STATE_CMovingBrush_MoveToMarker, TRUE, EVoid());return TRUE;case EVENTCODE_EEnd: Jump(STATE_CURRENT,0x0065000f, FALSE, __eeInput); return TRUE;default: return FALSE; }}BOOL CMovingBrush::H0x0065000f_MoveBrush_07(const CEntityEvent &__eeInput){
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x0065000f
|
|
const EEnd&__e= (EEnd&)__eeInput;
|
|
;
|
|
#line 766 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
StopFollowSound ();
|
|
#line 767 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
PlayStopSound ();Jump(STATE_CURRENT,0x00650010, FALSE, EInternal());return TRUE;}BOOL CMovingBrush::H0x00650010_MoveBrush_08(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650010
|
|
|
|
#line 771 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bForceStop ){
|
|
#line 772 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bValidMarker = LoadMarkerParameters ();
|
|
#line 773 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 776 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bSkipMarker ){
|
|
#line 777 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bStopMoving = FALSE ;
|
|
#line 778 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}if(!(! m_bStopMoving && m_bValidMarker && ! m_bForceStop )){ Jump(STATE_CURRENT,0x00650012, FALSE, EInternal());return TRUE;}Jump(STATE_CURRENT,0x00650011, FALSE, EInternal());return TRUE;
|
|
#line 779 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}BOOL CMovingBrush::H0x00650012_MoveBrush_10(const CEntityEvent &__eeInput) {
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650012
|
|
|
|
#line 780 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MovingOff ();
|
|
#line 781 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 781 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CMovingBrush::
|
|
#line 784 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
TeleportToStopMarker(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CMovingBrush_TeleportToStopMarker
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMovingBrush::TeleportToStopMarker expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 786 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MovingOn ();
|
|
#line 788 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
INDEX ctMarkers = 0;
|
|
#line 790 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
CMovingBrushMarker * pmbm = (CMovingBrushMarker *) & * m_penTarget ;
|
|
#line 791 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
while(pmbm != NULL && IsOfClass (pmbm -> m_penTarget , "Moving Brush Marker") && ! pmbm -> m_bStopMoving && ctMarkers < 50)
|
|
#line 792 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 793 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
pmbm = (CMovingBrushMarker *) & * pmbm -> m_penTarget ;
|
|
#line 794 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ctMarkers ++;
|
|
#line 795 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 797 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(pmbm != NULL && IsOfClass (pmbm , "Moving Brush Marker") && ctMarkers < 50)
|
|
#line 798 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 799 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetPlacement (pmbm -> GetPlacement ());
|
|
#line 800 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
en_plLastPlacement = pmbm -> GetPlacement ();
|
|
#line 801 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ForceFullStop ();
|
|
#line 802 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_soStart . Stop ();
|
|
#line 803 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_soStop . Stop ();
|
|
#line 804 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_soFollow . Stop ();
|
|
#line 805 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 808 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoveToMarker = FALSE ;
|
|
#line 809 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MovingOff ();
|
|
#line 810 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EReturn ());
|
|
#line 810 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CMovingBrush::
|
|
#line 813 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CMovingBrush_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMovingBrush::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 815 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
InitAsBrush ();
|
|
#line 816 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetPhysicsFlags (EPF_BRUSH_MOVING );
|
|
#line 817 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetCollisionFlags (ECF_BRUSH );
|
|
#line 818 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetHealth (m_fHealth );
|
|
#line 821 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bZoning ){
|
|
#line 822 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetFlags (GetFlags () | ENF_ZONING );
|
|
#line 823 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else {
|
|
#line 824 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetFlags (GetFlags () & ~ ENF_ZONING );
|
|
#line 825 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 829 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bDynamicShadows ){
|
|
#line 830 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetFlags (GetFlags () | ENF_DYNAMICSHADOWS );
|
|
#line 831 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else {
|
|
#line 832 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetFlags (GetFlags () & ~ ENF_DYNAMICSHADOWS );
|
|
#line 833 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 836 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ForceFullStop ();
|
|
#line 838 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetTimerAfter(0.1f);
|
|
Jump(STATE_CURRENT, 0x00650014, FALSE, EBegin());return TRUE;}BOOL CMovingBrush::H0x00650014_Main_01(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650014
|
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x00650015, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CMovingBrush::H0x00650015_Main_02(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650015
|
|
;
|
|
#line 841 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bValidMarker = LoadMarkerParameters ();
|
|
#line 848 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetTimerAt(THINKTIME_NEVER);
|
|
Jump(STATE_CURRENT, 0x00650016, FALSE, EBegin());return TRUE;}BOOL CMovingBrush::H0x00650016_Main_03(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650016
|
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
|
|
|
#line 850 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bAutoStart ){
|
|
#line 852 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 853 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bMoving && m_bValidMarker ){
|
|
#line 854 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_MoveBrush, TRUE, EVoid());return TRUE;
|
|
#line 855 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 856 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 857 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 858 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EHit):{const EHit&eHit= (EHit&)__eeInput;
|
|
|
|
#line 860 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bMoving ){
|
|
#line 861 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 862 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_MoveBrush, TRUE, EVoid());return TRUE;
|
|
#line 863 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 864 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 865 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_ETouch):{const ETouch&eTouch= (ETouch&)__eeInput;
|
|
|
|
#line 869 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_fTouchDamage != 0.0f)
|
|
#line 870 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 871 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
InflictDirectDamage (eTouch . penOther , this , DMT_SPIKESTAB , m_fTouchDamage ,
|
|
#line 872 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
eTouch . penOther -> GetPlacement () . pl_PositionVector , eTouch . plCollision );
|
|
#line 873 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 875 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_tdeSendEventOnDamage != TDE_DAMAGEONLY && CanReactOnEntity (eTouch . penOther )){
|
|
#line 876 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SendToTarget (m_penTouchEvent , m_eetTouchEvent );
|
|
#line 877 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 879 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bMoving ){
|
|
#line 881 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bMoveOnTouch && CanReactOnEntity (eTouch . penOther ) && m_bValidMarker ){
|
|
#line 882 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 883 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_MoveBrush, TRUE, EVoid());return TRUE;
|
|
#line 884 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 885 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 887 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bBlowupByBull ){
|
|
#line 889 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(IsOfClass (eTouch . penOther , "Werebull")){
|
|
#line 891 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT fImpactSpeed =
|
|
#line 892 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
((CMovableEntity &) * eTouch . penOther ) . en_vCurrentTranslationAbsolute %
|
|
#line 893 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
- (FLOAT3D &) eTouch . plCollision ;
|
|
#line 896 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(fImpactSpeed > m_fHealth ){
|
|
#line 898 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ReceiveDamage (eTouch . penOther , DMT_IMPACT , m_fHealth * 2 ,
|
|
#line 899 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT3D (0 , 0 , 0) , FLOAT3D (0 , 0 , 0));
|
|
#line 900 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 901 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 902 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 903 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 904 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EBlock):{const EBlock&eBlock= (EBlock&)__eeInput;
|
|
|
|
#line 907 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
InflictDirectDamage (eBlock . penOther , this , DMT_BRUSH , m_fBlockDamage ,
|
|
#line 908 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT3D (0.0f , 0.0f , 0.0f) , (FLOAT3D &) eBlock . plCollision );
|
|
#line 909 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_ebaAction == BA_BOUNCE ){
|
|
#line 911 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredTranslation (- m_vDesiredTranslation );
|
|
#line 912 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_bRotating ){
|
|
#line 913 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (- ANGLE3D (0.0f , 0.0f , 360.0f / m_tmBankingRotation ));
|
|
#line 914 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}else if(! m_tmBankingRotation ){
|
|
#line 915 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDesiredRotation (- m_aDesiredRotation );
|
|
#line 916 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 919 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_BounceObstructed, TRUE, EVoid());return TRUE;
|
|
#line 920 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 921 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 922 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EStart):{const EStart&e= (EStart&)__eeInput;
|
|
|
|
#line 926 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bMoving && m_bValidMarker ){
|
|
#line 927 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_MoveBrush, TRUE, EVoid());return TRUE;
|
|
#line 928 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 929 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 930 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EStop):{const EStop&e= (EStop&)__eeInput;
|
|
|
|
#line 933 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 934 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_ETeleportMovingBrush):{const ETeleportMovingBrush&e= (ETeleportMovingBrush&)__eeInput;
|
|
|
|
#line 936 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_TeleportToStopMarker, TRUE, EVoid());return TRUE;
|
|
#line 937 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 938 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_ETrigger):{const ETrigger&e= (ETrigger&)__eeInput;
|
|
|
|
#line 941 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bMoving && m_bValidMarker ){
|
|
#line 942 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Call(STATE_CURRENT, STATE_CMovingBrush_MoveBrush, TRUE, EVoid());return TRUE;
|
|
#line 943 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 944 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 945 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EActivate):{const EActivate&e= (EActivate&)__eeInput;
|
|
|
|
#line 947 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(! m_bRotating ){
|
|
#line 948 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
MaybeActivateRotation ();
|
|
#line 949 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 950 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 951 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EDeactivate):{const EDeactivate&e= (EDeactivate&)__eeInput;
|
|
|
|
#line 953 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
DeactivateRotation ();
|
|
#line 954 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE;
|
|
#line 955 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;case(EVENTCODE_EDeath):{const EDeath&eDeath= (EDeath&)__eeInput;
|
|
|
|
#line 958 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOATaabbox3D box ;
|
|
#line 959 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
GetSize (box );
|
|
#line 960 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
if(m_ctDebrises > 0)
|
|
#line 961 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{
|
|
#line 962 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT fEntitySize = pow (box . Size () (1) * box . Size () (2) * box . Size () (3) / m_ctDebrises , 1.0f / 3.0f) * m_fCubeFactor ;
|
|
#line 964 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Debris_Begin (EIBT_ROCK , DPT_NONE , BET_NONE , fEntitySize , FLOAT3D (1.0f , 2.0f , 3.0f) ,
|
|
#line 965 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT3D (0 , 0 , 0) , 1.0f + m_fCandyEffect / 2.0f , m_fCandyEffect , m_colDebrises );
|
|
#line 966 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
for(INDEX iDebris = 0;iDebris < m_ctDebrises ;iDebris ++){
|
|
#line 967 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Debris_Spawn (this , this , MODEL_STONE , TEXTURE_STONE , 0 , 0 , 0 , IRnd () % 4 , 1.0f ,
|
|
#line 968 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FLOAT3D (FRnd () * 0.8f + 0.1f , FRnd () * 0.8f + 0.1f , FRnd () * 0.8f + 0.1f));
|
|
#line 969 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 970 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 973 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
FOREACHINLIST (CEntity , en_lnInParent , en_lhChildren , iten ){
|
|
#line 974 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
iten -> SendEvent (EBrushDestroyed ());
|
|
#line 975 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}
|
|
#line 977 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SendToTarget (m_penBlowupEvent , m_eetBlowupEvent , eDeath . eLastDamage . penInflictor );
|
|
#line 980 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_tdeSendEventOnDamage = TDE_TOUCHONLY ;
|
|
#line 981 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_fHealth = - 1;
|
|
#line 982 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
m_bMoveOnDamage = FALSE ;
|
|
#line 983 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
ForceFullStop ();
|
|
#line 984 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetDefaultProperties ();
|
|
#line 988 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
NotifyCollisionChanged ();
|
|
#line 990 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetFlags (GetFlags () | ENF_HIDDEN );
|
|
#line 991 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
SetCollisionFlags (ECF_IMMATERIAL );
|
|
#line 994 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
{FOREACHINLIST (CEntity , en_lnInParent , en_lhChildren , itenChild ){
|
|
#line 996 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
itenChild -> SendEvent (ERangeModelDestruction ());
|
|
#line 997 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}}
|
|
#line 999 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
UnsetTimer();Jump(STATE_CURRENT,0x00650017, FALSE, EInternal());return TRUE;
|
|
#line 1000 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}ASSERT(FALSE);break;default: return FALSE; break;
|
|
#line 1001 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
}return TRUE;}BOOL CMovingBrush::H0x00650017_Main_04(const CEntityEvent &__eeInput){
|
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT 0x00650017
|
|
|
|
#line 1002 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 1002 "D:/SE1_GPL/Sources/EntitiesMP/MovingBrush.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;}; |