/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 7 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" #include "StdH.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define CLEARMEM(var) memset(&var, 0, sizeof(var)) #include #include #line 36 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" #define ANYEXCEPTION ... template CStaticStackArray; #define MAXCOLLISIONRETRIES 4*4 extern FLOAT phy_fCollisionCacheAhead; extern FLOAT phy_fCollisionCacheAround; extern FLOAT cli_fPredictionFilter; // force breakpoint (debug) extern INDEX dbg_bBreak; // must be in separate function to disable stupid optimizer extern void Breakpoint(void); CEntity *GetPredictedSafe(CEntity *pen) { if ((pen->en_ulFlags&(ENF_PREDICTOR|ENF_TEMPPREDICTOR)) == ENF_PREDICTOR) { return pen->GetPredicted(); } else { return pen; } } // add acceleration to velocity static inline void AddAcceleration( FLOAT3D &vCurrentVelocity, const FLOAT3D &vDesiredVelocity, FLOAT fAcceleration, FLOAT fDecceleration) { // if desired velocity is smaller than current velocity if (vDesiredVelocity.Length()fAcceleration) { vCurrentVelocity += vDelta*(fAcceleration/fDelta); } else { vCurrentVelocity = vDesiredVelocity; } } // add gravity acceleration to velocity along an axis static inline void AddGAcceleration( FLOAT3D &vCurrentVelocity, const FLOAT3D &vGDir, FLOAT fGA, FLOAT fGV) { // disassemble speed FLOAT3D vCurrentParallel, vCurrentOrthogonal; GetParallelAndNormalComponents(vCurrentVelocity, vGDir, vCurrentOrthogonal, vCurrentParallel); /* IMPORTANT: This is how this piece of code should look like: // if not already going down at max speed if (! (vCurrentOrthogonal%vGDir>=fGV)) { // add accelleration to parallel speed vCurrentOrthogonal+=vGDir*fGA; // if going down at max speed if (vCurrentOrthogonal%vGDir>=fGV) { // clamp vCurrentOrthogonal = vGDir*fGV; } } But, due to need for compatibility with older versions and bad VC code generator, we use this kludge: */ // KLUDGE_BEGIN if (_pNetwork->ga_ulDemoMinorVersion<=2) { Swap(vCurrentOrthogonal, vCurrentParallel); } FLOAT3D vCurrentOrthogonalOrg=vCurrentOrthogonal; // add accelleration to parallel speed vCurrentOrthogonal+=vGDir*fGA; // if going down at max speed if (vCurrentOrthogonal%vGDir>=fGV) { // clamp vCurrentOrthogonal = vGDir*fGV; } else { vCurrentOrthogonalOrg = vCurrentOrthogonal; } if (_pNetwork->ga_ulDemoMinorVersion>2) { vCurrentOrthogonal=vCurrentOrthogonalOrg; } // KLUDGE_END // assemble speed back vCurrentVelocity = vCurrentParallel+vCurrentOrthogonal; } // NOTE: // this is pulled out into a separate function because, otherwise, VC6 generates // invalid code when optimizing this. no clue why is that so. #pragma inline_depth(0) static void CheckAndAddGAcceleration(CMovableEntity *pen, FLOAT3D &vTranslationAbsolute, FLOAT fTickQuantum) { // if there is forcefield involved if (pen->en_fForceA>0.01f) { // add force acceleration FLOAT fGV=pen->en_fForceV*fTickQuantum; FLOAT fGA=pen->en_fForceA*fTickQuantum*fTickQuantum; AddGAcceleration(vTranslationAbsolute, pen->en_vForceDir, fGA, fGV); } } #pragma inline_depth() // see important note above // add acceleration to velocity, but only along a plane static inline void AddAccelerationOnPlane( FLOAT3D &vCurrentVelocity, const FLOAT3D &vDesiredVelocity, FLOAT fAcceleration, FLOAT fDecceleration, const FLOAT3D &vPlaneNormal) { FLOAT3D vCurrentParallel, vCurrentOrthogonal; GetParallelAndNormalComponents(vCurrentVelocity, vPlaneNormal, vCurrentOrthogonal, vCurrentParallel); FLOAT3D vDesiredParallel; GetNormalComponent(vDesiredVelocity, vPlaneNormal, vDesiredParallel); AddAcceleration(vCurrentParallel, vDesiredParallel, fAcceleration, fDecceleration); vCurrentVelocity = vCurrentParallel+vCurrentOrthogonal; } // add acceleration to velocity, for roller-coaster slope -- slow! static inline void AddAccelerationOnPlane2( FLOAT3D &vCurrentVelocity, const FLOAT3D &vDesiredVelocity, FLOAT fAcceleration, FLOAT fDecceleration, const FLOAT3D &vPlaneNormal, const FLOAT3D &vGravity) { // get down and horizontal direction FLOAT3D vDn; GetNormalComponent(vGravity, vPlaneNormal, vDn); vDn.Normalize(); FLOAT3D vRt = vPlaneNormal*vDn; vRt.Normalize(); // add only horizontal acceleration FLOAT3D vCurrentParallel, vCurrentOrthogonal; GetParallelAndNormalComponents(vCurrentVelocity, vRt, vCurrentParallel, vCurrentOrthogonal); FLOAT3D vDesiredParallel; GetParallelComponent(vDesiredVelocity, vRt, vDesiredParallel); AddAcceleration(vCurrentParallel, vDesiredParallel, fAcceleration, fDecceleration); vCurrentVelocity = vCurrentParallel+vCurrentOrthogonal; } // max number of retries during movement static INDEX _ctTryToMoveCheckCounter; static INDEX _ctSliding; static FLOAT3D _vSlideOffDir; // move away direction for sliding static FLOAT3D _vSlideDir; static void InitTryToMove(void) { _ctTryToMoveCheckCounter = MAXCOLLISIONRETRIES; _ctSliding = 0; _vSlideOffDir = FLOAT3D(0,0,0); _vSlideDir = FLOAT3D(0,0,0); } // array of forces for current entity class CEntityForce { public: CEntityPointer ef_penEntity; INDEX ef_iForceType; FLOAT ef_fRatio; // how much of entity this force gets [0-1] inline void Clear(void) { ef_penEntity = NULL; }; ~CEntityForce(void) { Clear(); }; }; static CStaticStackArray _aefForces; void ClearMovableEntityCaches(void) { _aefForces.Clear(); } void CMovableEntity::SetDefaultProperties(void) { en_vDesiredTranslationRelative = FLOAT3D(0.0f , 0.0f , 0.0f); en_aDesiredRotationRelative = ANGLE3D(0 , 0 , 0); en_vCurrentTranslationAbsolute = FLOAT3D(0.0f , 0.0f , 0.0f); en_aCurrentRotationAbsolute = ANGLE3D(0 , 0 , 0); en_penReference = NULL; en_vReferencePlane = FLOAT3D(0.0f , 0.0f , 0.0f); en_iReferenceSurface = 0; en_penLastValidReference = NULL; en_tmLastSignificantVerticalMovement = 0.0f; en_tmLastBreathed = 0; en_tmMaxHoldBreath = 5.0f; en_fDensity = 5000.0f; en_tmLastSwimDamage = 0; en_iUpContent = 0; en_iDnContent = 0; en_fImmersionFactor = 1.0f; en_vGravityDir = FLOAT3D(0 , - 1 , 0); en_fGravityA = 0.0f; en_fGravityV = 0.0f; en_vForceDir = FLOAT3D(1 , 0 , 0); en_fForceA = 0.0f; en_fForceV = 0.0f; en_tmJumped = 0; en_tmMaxJumpControl = 0.5f; en_fJumpControlMultiplier = 0.5f; en_fAcceleration = 200.0f; en_fDeceleration = 40.0f; en_fStepUpHeight = 1.0f; en_fStepDnHeight = -1.0f; en_fBounceDampParallel = 0.5f; en_fBounceDampNormal = 0.5f; en_fCollisionSpeedLimit = 20.0f; en_fCollisionDamageFactor = 20.0f; en_boxMovingEstimate = FLOATaabbox3D(FLOAT3D (0 , 0 , 0) , 0.01f); en_boxNearCached = FLOATaabbox3D(FLOAT3D (0 , 0 , 0) , 0.01f); en_vIntendedTranslation = FLOAT3D(0 , 0 , 0); en_mIntendedRotation = FLOATmatrix3D(0); CRationalEntity::SetDefaultProperties(); } #line 319 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::ResetPredictionFilter(void) #line 320 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 321 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastPredictionHead = - 2; #line 322 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vLastHead = en_plPlacement . pl_PositionVector ; #line 323 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vPredError = en_vPredErrorLast = FLOAT3D (0 , 0 , 0); #line 324 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } CMovableEntity::CMovableEntity(void) #line 328 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 329 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 330 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_apbpoNearPolygons . SetAllocationStep (5); #line 331 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ResetPredictionFilter (); #line 332 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } CMovableEntity:: ~ CMovableEntity(void) #line 334 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 335 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::OnInitialize(const CEntityEvent & eeInput) #line 339 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 340 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRationalEntity :: OnInitialize (eeInput ); #line 341 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearTemporaryData (); #line 342 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vIntendedTranslation = FLOAT3D (0 , 0 , 0); #line 343 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mIntendedRotation . Diagonal (1.0f); #line 344 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxNearCached = FLOATaabbox3D (); #line 345 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate = FLOATaabbox3D (); #line 346 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 347 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::OnEnd(void) #line 350 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 352 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_lnInMovers . IsLinked ()){ #line 353 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_lnInMovers . Remove (); #line 354 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 355 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearTemporaryData (); #line 356 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxNearCached = FLOATaabbox3D (); #line 357 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate = FLOATaabbox3D (); #line 358 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRationalEntity :: OnEnd (); #line 359 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::Copy(CEntity & enOther,ULONG ulFlags) #line 361 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 362 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRationalEntity :: Copy (enOther , ulFlags ); #line 363 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * pmenOther = (CMovableEntity *) (& enOther ); #line 365 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(ulFlags & COPY_PREDICTOR ){ #line 366 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plLastPlacement = pmenOther -> en_plLastPlacement ; #line 367 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = pmenOther -> en_vNextPosition ; #line 368 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mNextRotation = pmenOther -> en_mNextRotation ; #line 371 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation = pmenOther -> en_vAppliedTranslation ; #line 372 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mAppliedRotation = pmenOther -> en_mAppliedRotation ; #line 373 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxNearCached = pmenOther -> en_boxNearCached ; #line 374 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate = pmenOther -> en_boxMovingEstimate ; #line 375 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = pmenOther -> en_pbpoStandOn ; #line 376 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_apbpoNearPolygons = pmenOther -> en_apbpoNearPolygons ; #line 377 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 378 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearTemporaryData (); #line 379 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxNearCached = FLOATaabbox3D (); #line 380 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate = FLOATaabbox3D (); #line 381 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 382 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 384 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ResetPredictionFilter (); #line 385 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plLastPlacement = pmenOther -> en_plLastPlacement ; #line 386 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pmenOther -> en_lnInMovers . IsLinked ()){ #line 387 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 388 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 389 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 391 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::ClearTemporaryData(void) #line 392 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 393 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plLastPlacement = en_plPlacement ; #line 395 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = en_plPlacement . pl_PositionVector ; #line 396 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mNextRotation = en_mRotation ; #line 399 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation = FLOAT3D (0 , 0 , 0); #line 400 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mAppliedRotation . Diagonal (1.0f); #line 401 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ResetPredictionFilter (); #line 407 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::ChecksumForSync(ULONG & ulCRC,INDEX iExtensiveSyncCheck) #line 411 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 412 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRationalEntity :: ChecksumForSync (ulCRC , iExtensiveSyncCheck ); #line 413 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(iExtensiveSyncCheck > 0){ #line 414 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn != NULL ){ #line 415 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddLONG (ulCRC , en_pbpoStandOn -> bpo_iInWorld ); #line 416 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 417 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddFLOAT (ulCRC , en_apbpoNearPolygons . Count ()); #line 418 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(iExtensiveSyncCheck > 2){ #line 419 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" for(INDEX i = 0;i < en_apbpoNearPolygons . Count ();i ++){ #line 420 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddLONG (ulCRC , en_apbpoNearPolygons [ i ] -> bpo_iInWorld ); #line 421 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 422 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 423 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddBlock (ulCRC , (UBYTE *) & en_vReferencePlane , sizeof (en_vReferencePlane )); #line 424 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddBlock (ulCRC , (UBYTE *) & en_vDesiredTranslationRelative , sizeof (en_vDesiredTranslationRelative )); #line 425 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddBlock (ulCRC , (UBYTE *) & en_aDesiredRotationRelative , sizeof (en_aDesiredRotationRelative )); #line 426 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddBlock (ulCRC , (UBYTE *) & en_vCurrentTranslationAbsolute , sizeof (en_vCurrentTranslationAbsolute )); #line 427 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRC_AddBlock (ulCRC , (UBYTE *) & en_aCurrentRotationAbsolute , sizeof (en_aCurrentRotationAbsolute )); #line 428 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 429 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::DumpSync_t(CTStream & strm,INDEX iExtensiveSyncCheck) #line 433 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 434 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRationalEntity :: DumpSync_t (strm , iExtensiveSyncCheck ); #line 435 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(iExtensiveSyncCheck > 0){ #line 436 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("standon polygon: "); #line 437 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn != NULL ){ #line 438 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("%d\n" , en_pbpoStandOn -> bpo_iInWorld ); #line 439 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 440 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("\n"); #line 441 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 442 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("near polygons: %d - " , en_apbpoNearPolygons . Count ()); #line 443 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(iExtensiveSyncCheck > 2){ #line 444 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" for(INDEX i = 0;i < en_apbpoNearPolygons . Count ();i ++){ #line 445 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("%d, " , en_apbpoNearPolygons [ i ] -> bpo_iInWorld ); #line 446 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 447 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 448 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("\n"); #line 449 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("desired translation: %g, %g, %g (%08X %08X %08X)\n" , #line 450 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vDesiredTranslationRelative (1) , #line 451 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vDesiredTranslationRelative (2) , #line 452 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vDesiredTranslationRelative (3) , #line 453 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vDesiredTranslationRelative (1) , #line 454 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vDesiredTranslationRelative (2) , #line 455 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vDesiredTranslationRelative (3)); #line 456 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("desired rotation: %g, %g, %g (%08X %08X %08X)\n" , #line 457 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative (1) , #line 458 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative (2) , #line 459 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative (3) , #line 460 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_aDesiredRotationRelative (1) , #line 461 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_aDesiredRotationRelative (2) , #line 462 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_aDesiredRotationRelative (3)); #line 463 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("current translation: %g, %g, %g (%08X %08X %08X)\n" , #line 464 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (1) , #line 465 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (2) , #line 466 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (3) , #line 467 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vCurrentTranslationAbsolute (1) , #line 468 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vCurrentTranslationAbsolute (2) , #line 469 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vCurrentTranslationAbsolute (3)); #line 470 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("current rotation: %g, %g, %g (%08X %08X %08X)\n" , #line 471 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aCurrentRotationAbsolute (1) , #line 472 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aCurrentRotationAbsolute (2) , #line 473 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aCurrentRotationAbsolute (3) , #line 474 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_aCurrentRotationAbsolute (1) , #line 475 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_aCurrentRotationAbsolute (2) , #line 476 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_aCurrentRotationAbsolute (3)); #line 477 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("reference plane: %g, %g, %g (%08X %08X %08X)\n" , #line 478 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane (1) , #line 479 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane (2) , #line 480 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane (3) , #line 481 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vReferencePlane (1) , #line 482 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vReferencePlane (2) , #line 483 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ULONG &) en_vReferencePlane (3)); #line 484 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("reference surface: %d\n" , en_iReferenceSurface ); #line 485 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("reference entity: "); #line 486 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL ){ #line 487 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("id: %08X\n" , en_penReference -> en_ulID ); #line 488 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 489 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" strm . FPrintF_t ("none\n"); #line 490 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 491 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 492 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::Read_t(CTStream * istr) #line 496 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 497 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRationalEntity :: Read_t (istr ); #line 499 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearTemporaryData (); #line 502 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(istr -> PeekID_t () == CChunkID ("MENT")){ #line 503 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" istr -> ExpectID_t ("MENT"); #line 505 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX ibpo ; #line 506 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* istr ) >> ibpo ; #line 507 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = GetWorldPolygonPointer (ibpo ); #line 509 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bAnyNULLs = FALSE ; #line 510 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX ctbpoNear ; #line 511 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* istr ) >> ctbpoNear ; #line 512 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(ctbpoNear > 0){ #line 513 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_apbpoNearPolygons . PopAll (); #line 514 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_apbpoNearPolygons . Push (ctbpoNear ); #line 515 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" for(INDEX i = 0;i < ctbpoNear ;i ++){ #line 516 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX ibpo ; #line 517 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* istr ) >> ibpo ; #line 518 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_apbpoNearPolygons [ i ] = GetWorldPolygonPointer (ibpo ); #line 519 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_apbpoNearPolygons [ i ] == NULL ){ #line 520 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bAnyNULLs = TRUE ; #line 521 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 522 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 523 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bAnyNULLs ){ #line 524 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPrintF ("NULL saved for near polygon!\n"); #line 525 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_apbpoNearPolygons . PopAll (); #line 526 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 527 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 528 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 531 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bWasMoving ; #line 532 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* istr ) >> bWasMoving ; #line 533 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bWasMoving ){ #line 535 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 536 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 537 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::Write_t(CTStream * ostr) #line 540 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 541 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CRationalEntity :: Write_t (ostr ); #line 543 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ostr -> WriteID_t ("MENT"); #line 545 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX ibpo ; #line 546 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ibpo = GetWorldPolygonIndex (en_pbpoStandOn ); #line 547 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* ostr ) << ibpo ; #line 549 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX ctbpoNear = en_apbpoNearPolygons . Count (); #line 550 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* ostr ) << ctbpoNear ; #line 551 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" for(INDEX i = 0;i < ctbpoNear ;i ++){ #line 552 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX ibpo ; #line 553 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ibpo = GetWorldPolygonIndex (en_apbpoNearPolygons [ i ]); #line 554 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* ostr ) << ibpo ; #line 555 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 559 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (* ostr ) << en_lnInMovers . IsLinked (); #line 560 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } CPlacement3D CMovableEntity::GetLerpedPlacement(void)const #line 564 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 566 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fLerpFactor ; #line 567 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsPredictor ()){ #line 568 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fLerpFactor = _pTimer -> GetLerpFactor (); #line 569 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 570 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fLerpFactor = _pTimer -> GetLerpFactor2 (); #line 571 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 572 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPlacement3D plLerped ; #line 573 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" plLerped . Lerp (en_plLastPlacement , en_plPlacement , fLerpFactor ); #line 574 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penTail = (CMovableEntity *) GetPredictedSafe ((CEntity *) this ); #line 576 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" extern BOOL _bPredictionActive ; #line 577 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_bPredictionActive ){ #line 579 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vError = penTail -> en_vPredError ; #line 580 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vError *= pow (cli_fPredictionFilter , fLerpFactor ); #line 585 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" plLerped . pl_PositionVector -= vError ; #line 586 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 587 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return plLerped ; #line 588 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::AddToMovers(void) #line 591 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 592 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! en_lnInMovers . IsLinked ()){ #line 593 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pwoWorld -> wo_lhMovers . AddTail (en_lnInMovers ); #line 594 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 595 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::AddToMoversDuringMoving(void) #line 598 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 600 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_lnInMovers . IsLinked ()){ #line 602 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 603 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 605 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 607 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_FORCEADDED ; #line 608 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::SetDesiredRotation(const ANGLE3D & aRotation) #line 612 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 613 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = aRotation ; #line 614 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 615 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } const ANGLE3D & CMovableEntity::GetDesiredRotation(void)const {return en_aDesiredRotationRelative ;} void CMovableEntity::SetDesiredTranslation(const FLOAT3D & vTranslation) #line 620 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 621 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vDesiredTranslationRelative = vTranslation ; #line 622 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 623 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } const FLOAT3D & CMovableEntity::GetDesiredTranslation(void)const {return en_vDesiredTranslationRelative ;} void CMovableEntity::GiveImpulseTranslationRelative(const FLOAT3D & vImpulseSpeedRelative) #line 628 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 629 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPlacement3D plImpulseSpeedAbsolute (vImpulseSpeedRelative , ANGLE3D (0 , 0 , 0)); #line 630 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" plImpulseSpeedAbsolute . RelativeToAbsolute ( #line 631 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPlacement3D (FLOAT3D (0.0f , 0.0f , 0.0f) , en_plPlacement . pl_OrientationAngle )); #line 632 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute += plImpulseSpeedAbsolute . pl_PositionVector ; #line 633 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 634 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::GiveImpulseTranslationAbsolute(const FLOAT3D & vImpulseSpeed) #line 636 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 637 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute += vImpulseSpeed ; #line 638 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 639 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::LaunchAsPropelledProjectile(const FLOAT3D & vImpulseSpeedRelative, #line 642 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penLauncher) #line 643 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 644 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vDesiredTranslationRelative = vImpulseSpeedRelative ; #line 645 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute += vImpulseSpeedRelative * en_mRotation ; #line 647 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 648 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::LaunchAsFreeProjectile(const FLOAT3D & vImpulseSpeedRelative, #line 650 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penLauncher) #line 651 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 652 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute += vImpulseSpeedRelative * en_mRotation ; #line 655 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 656 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::ForceStopTranslation(void) { #line 660 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vDesiredTranslationRelative = FLOAT3D (0.0f , 0.0f , 0.0f); #line 661 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute = FLOAT3D (0.0f , 0.0f , 0.0f); #line 662 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation = FLOAT3D (0.0f , 0.0f , 0.0f); #line 663 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::ForceStopRotation(void) { #line 667 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = ANGLE3D (0 , 0 , 0); #line 668 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aCurrentRotationAbsolute = ANGLE3D (0 , 0 , 0); #line 669 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mAppliedRotation . Diagonal (1.0f); #line 670 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::ForceFullStop(void) { #line 674 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ForceStopTranslation (); #line 675 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ForceStopRotation (); #line 676 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::FakeJump(const FLOAT3D & vOrgSpeed,const FLOAT3D & vDirection,FLOAT fStrength, #line 680 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fParallelMultiplier,FLOAT fNormalMultiplier,FLOAT fMaxExitSpeed,TIME tmControl) #line 681 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 683 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmJumped = _pTimer -> CurrentTick () - en_tmMaxJumpControl + tmControl ; #line 686 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vCurrentNormal ; #line 687 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vCurrentParallel ; #line 688 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetParallelAndNormalComponents (vOrgSpeed , vDirection , vCurrentParallel , vCurrentNormal ); #line 697 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute = #line 698 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vCurrentParallel * fParallelMultiplier + #line 699 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vCurrentNormal * fNormalMultiplier + #line 700 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDirection * fStrength ; #line 703 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fLength = en_vCurrentTranslationAbsolute . Length (); #line 704 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fLength > fMaxExitSpeed ) #line 705 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 706 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute = #line 707 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute / fLength * fMaxExitSpeed ; #line 708 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 716 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_penReference = NULL ; #line 717 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 718 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane = FLOAT3D (0.0f , 0.0f , 0.0f); #line 719 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_iReferenceSurface = 0; #line 722 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddToMovers (); #line 723 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } ANGLE CMovableEntity::GetRelativeHeading(const FLOAT3D & vDirection) { #line 727 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (Abs (vDirection . Length () - 1) < 0.001f); #line 729 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFront = #line 730 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (1) * en_mRotation (1 , 3) #line 731 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (2) * en_mRotation (2 , 3) #line 732 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (3) * en_mRotation (3 , 3); #line 734 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fLeft = #line 735 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (1) * en_mRotation (1 , 1) #line 736 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (2) * en_mRotation (2 , 1) #line 737 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (3) * en_mRotation (3 , 1); #line 739 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ATan2 (fLeft , fFront ); #line 740 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } ANGLE CMovableEntity::GetRelativePitch(const FLOAT3D & vDirection) { #line 742 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (Abs (vDirection . Length () - 1) < 0.001f); #line 744 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFront = #line 745 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (1) * en_mRotation (1 , 3) #line 746 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (2) * en_mRotation (2 , 3) #line 747 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - vDirection (3) * en_mRotation (3 , 3); #line 749 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fUp = #line 750 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" + vDirection (1) * en_mRotation (1 , 2) #line 751 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" + vDirection (2) * en_mRotation (2 , 2) #line 752 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" + vDirection (3) * en_mRotation (3 , 2); #line 754 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ATan2 (fUp , fFront ); #line 755 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::GetReferenceHeadingDirection(const FLOAT3D & vReference,ANGLE aH,FLOAT3D & vDirection) { #line 759 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (Abs (vReference . Length () - 1) < 0.001f); #line 760 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vY (en_mRotation (1 , 2) , en_mRotation (2 , 2) , en_mRotation (3 , 2)); #line 761 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vX = (vY * vReference ) . Normalize (); #line 762 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vMZ = vY * vX ; #line 763 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDirection = - vX * Sin (aH ) + vMZ * Cos (aH ); #line 764 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::GetHeadingDirection(ANGLE aH,FLOAT3D & vDirection) { #line 768 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vX (en_mRotation (1 , 1) , en_mRotation (2 , 1) , en_mRotation (3 , 1)); #line 769 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vZ (en_mRotation (1 , 3) , en_mRotation (2 , 3) , en_mRotation (3 , 3)); #line 770 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDirection = - vX * Sin (aH ) - vZ * Cos (aH ); #line 771 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::GetPitchDirection(ANGLE aH,FLOAT3D & vDirection) { #line 775 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vY (en_mRotation (1 , 2) , en_mRotation (2 , 2) , en_mRotation (3 , 2)); #line 776 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vZ (en_mRotation (1 , 3) , en_mRotation (2 , 3) , en_mRotation (3 , 3)); #line 777 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDirection = - vZ * Cos (aH ) + vY * Sin (aH ); #line 778 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 781 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CEntity * CMovableEntity::MiscDamageInflictor(void) #line 782 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 785 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penLastValidReference != NULL ){ #line 786 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return en_penLastValidReference ; #line 787 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 788 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CBrushSector * pbsc = GetFirstSector (); #line 789 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pbsc == NULL ){ #line 790 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return this ; #line 791 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 792 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return pbsc -> bsc_pbmBrushMip -> bm_pbrBrush -> br_penEntity ; #line 793 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 794 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 795 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 798 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::UpdateOneSectorForce(CBrushSector & bsc,FLOAT fRatio) #line 799 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 801 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fRatio < 0.01f){ #line 803 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 804 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 805 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX iForceType = bsc . GetForceType (); #line 806 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CEntity * penEntity = bsc . bsc_pbmBrushMip -> bm_pbrBrush -> br_penEntity ; #line 826 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CEntityForce * pef = NULL ; #line 827 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" for(INDEX iForce = 0;iForce < _aefForces . Count ();iForce ++){ #line 828 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penEntity == _aefForces [ iForce ] . ef_penEntity #line 829 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && iForceType == _aefForces [ iForce ] . ef_iForceType ){ #line 830 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" pef = & _aefForces [ iForce ]; #line 831 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" break ; #line 832 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 833 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 836 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pef == NULL ){ #line 838 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" pef = _aefForces . Push (1); #line 839 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" pef -> ef_penEntity = penEntity ; #line 840 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" pef -> ef_iForceType = iForceType ; #line 841 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" pef -> ef_fRatio = 0.0f; #line 842 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 843 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" pef -> ef_fRatio += fRatio ; #line 844 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 847 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::TestFields(INDEX & iUpContent,INDEX & iDnContent,FLOAT & fImmersionFactor) #line 848 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 850 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (en_RenderType == RT_MODEL || en_RenderType == RT_EDITORMODEL || en_RenderType == RT_SKAMODEL || en_RenderType == RT_SKAEDITORMODEL ); #line 851 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iUpContent = 0; #line 852 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iDnContent = 0; #line 853 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fUp = 0.0f; #line 854 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fDn = 0.0f; #line 856 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D & vOffset = en_plPlacement . pl_PositionVector ; #line 857 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D & mRotation = en_mRotation ; #line 859 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vMin = FLOAT3D (0 , en_pciCollisionInfo -> ci_fMinHeight , 0); #line 860 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vMax = FLOAT3D (0 , en_pciCollisionInfo -> ci_fMaxHeight , 0); #line 861 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vMin = vMin * mRotation + vOffset ; #line 862 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vMax = vMax * mRotation + vOffset ; #line 864 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CStaticArray < CMovingSphere > & absSpheres = en_pciCollisionInfo -> ci_absSpheres ; #line 865 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FOREACHINSTATICARRAY (absSpheres , CMovingSphere , itms ){ #line 866 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" itms -> ms_vRelativeCenter0 = itms -> ms_vCenter * mRotation + vOffset ; #line 867 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 870 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _aefForces . PopAll (); #line 872 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {FOREACHSRCOFDST (en_rdSectors , CBrushSector , bsc_rsEntities , pbsc ) #line 873 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CBrushSector & bsc = * pbsc ; #line 875 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! bsc . bsc_pbmBrushMip -> IsFirstMip ()){ #line 877 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" continue ; #line 878 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 880 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CEntity * penSector = bsc . bsc_pbmBrushMip -> bm_pbrBrush -> br_penEntity ; #line 883 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penSector -> en_RenderType != RT_BRUSH ){ #line 885 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" continue ; #line 886 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 889 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" double dMin , dMax ; #line 890 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bsc . bsc_bspBSPTree . FindLineMinMax (FLOATtoDOUBLE (vMin ) , FLOATtoDOUBLE (vMax ) , dMin , dMax ); #line 893 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX iContent = bsc . GetContentType (); #line 894 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(iContent != 0){ #line 896 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(dMax > 0.0f && dMin < 1.0f){ #line 899 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(dMin < 0.01f){ #line 901 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iDnContent = iContent ; #line 902 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fDn = Max (fDn , FLOAT (dMax )); #line 903 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 905 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(dMax > 0.99f){ #line 907 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iUpContent = iContent ; #line 908 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fUp = Max (fUp , 1 - FLOAT (dMin )); #line 909 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 910 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 911 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 914 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" UpdateOneSectorForce (bsc , dMax - dMin ); #line 916 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ENDFOR ;} #line 920 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(iUpContent == iDnContent ){ #line 922 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fImmersionFactor = 1.0f; #line 924 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 926 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(iUpContent == 0){ #line 927 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fImmersionFactor = fDn ; #line 928 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(iDnContent == 0){ #line 929 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fImmersionFactor = 1 - fUp ; #line 930 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 931 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fImmersionFactor = Max (fDn , 1 - fUp ); #line 932 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 934 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fImmersionFactor < 0.01f){ #line 935 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fImmersionFactor = 1.0f; #line 936 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iDnContent = iUpContent ; #line 937 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(fImmersionFactor > 0.99f){ #line 938 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fImmersionFactor = 1.0f; #line 939 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iUpContent = iDnContent ; #line 940 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 941 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 944 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vGravityA (0 , 0 , 0); #line 945 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vGravityV (0 , 0 , 0); #line 946 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vForceA (0 , 0 , 0); #line 947 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vForceV (0 , 0 , 0); #line 948 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fRatioSum = 0.0f; #line 950 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {for(INDEX iForce = 0;iForce < _aefForces . Count ();iForce ++){ #line 951 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CForceStrength fsGravity ; #line 952 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CForceStrength fsField ; #line 953 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _aefForces [ iForce ] . ef_penEntity -> GetForce ( #line 954 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _aefForces [ iForce ] . ef_iForceType , en_plPlacement . pl_PositionVector , #line 955 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fsGravity , fsField ); #line 956 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fRatio = _aefForces [ iForce ] . ef_fRatio ; #line 957 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fRatioSum += fRatio ; #line 958 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vGravityA += fsGravity . fs_vDirection * fsGravity . fs_fAcceleration * fRatio ; #line 959 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vGravityV += fsGravity . fs_vDirection * fsGravity . fs_fVelocity * fRatio ; #line 960 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fsField . fs_fAcceleration > 0){ #line 961 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vForceA += fsField . fs_vDirection * fsField . fs_fAcceleration * fRatio ; #line 962 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vForceV += fsField . fs_vDirection * fsField . fs_fVelocity * fRatio ; #line 963 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 964 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _aefForces [ iForce ] . Clear (); #line 965 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }} #line 966 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fRatioSum > 0){ #line 967 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vGravityA /= fRatioSum ; #line 968 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vGravityV /= fRatioSum ; #line 969 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vForceA /= fRatioSum ; #line 970 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vForceV /= fRatioSum ; #line 971 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 972 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_fGravityA = vGravityA . Length (); #line 973 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_fGravityA < 0.01f){ #line 974 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_fGravityA = 0; #line 975 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 976 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_fGravityV = vGravityV . Length (); #line 977 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vGravityDir = vGravityA / en_fGravityA ; #line 978 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 979 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_fForceA = vForceA . Length (); #line 980 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_fForceA < 0.01f){ #line 981 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_fForceA = 0; #line 982 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 983 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_fForceV = vForceV . Length (); #line 984 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vForceDir = vForceA / en_fForceA ; #line 985 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 986 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _aefForces . PopAll (); #line 987 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 990 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::TestBreathing(CContentType & ctUp) #line 991 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 993 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! (en_ulPhysicsFlags & (EPF_HASLUNGS | EPF_HASGILLS ))){ #line 995 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 996 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 998 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bCanBreathe = #line 999 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ctUp . ct_ulFlags & CTF_BREATHABLE_LUNGS ) && (en_ulPhysicsFlags & EPF_HASLUNGS ) || #line 1000 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ctUp . ct_ulFlags & CTF_BREATHABLE_GILLS ) && (en_ulPhysicsFlags & EPF_HASGILLS ); #line 1001 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TIME tmNow = _pTimer -> CurrentTick (); #line 1002 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TIME tmBreathDelay = tmNow - en_tmLastBreathed ; #line 1004 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bCanBreathe ){ #line 1006 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastBreathed = tmNow ; #line 1008 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(tmBreathDelay > _pTimer -> TickQuantum * 2){ #line 1010 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ETakingBreath eTakingBreath ; #line 1011 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" eTakingBreath . fBreathDelay = tmBreathDelay / en_tmMaxHoldBreath ; #line 1012 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SendEvent (eTakingBreath ); #line 1013 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1015 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1017 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(tmBreathDelay > en_tmMaxHoldBreath ){ #line 1019 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InflictDirectDamage (this , MiscDamageInflictor () , DMT_DROWNING , ctUp . ct_fDrowningDamageAmount , #line 1020 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plPlacement . pl_PositionVector , - en_vGravityDir ); #line 1022 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastBreathed = tmNow - en_tmMaxHoldBreath + ctUp . ct_tmDrowningDamageDelay ; #line 1023 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1024 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1025 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1026 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::TestContentDamage(CContentType & ctDn,FLOAT fImmersion) #line 1027 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1029 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(ctDn . ct_fSwimDamageAmount > 0){ #line 1030 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TIME tmNow = _pTimer -> CurrentTick (); #line 1032 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(ctDn . ct_tmSwimDamageDelay > 0){ #line 1034 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(tmNow - en_tmLastSwimDamage > ctDn . ct_tmSwimDamageDelay + _pTimer -> TickQuantum ){ #line 1036 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastSwimDamage = tmNow + ctDn . ct_tmSwimDamageDelay ; #line 1037 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 1038 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1039 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1041 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(tmNow - en_tmLastSwimDamage > ctDn . ct_tmSwimDamageFrequency ){ #line 1043 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InflictDirectDamage (this , MiscDamageInflictor () , #line 1044 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (DamageType ) ctDn . ct_iSwimDamageType , ctDn . ct_fSwimDamageAmount * fImmersion , #line 1045 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plPlacement . pl_PositionVector , - en_vGravityDir ); #line 1046 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastSwimDamage = tmNow ; #line 1047 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1048 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1050 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(ctDn . ct_fKillImmersion > 0 && fImmersion >= ctDn . ct_fKillImmersion #line 1051 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && (en_ulFlags & ENF_ALIVE )){ #line 1053 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InflictDirectDamage (this , MiscDamageInflictor () , #line 1054 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (DamageType ) ctDn . ct_iKillDamageType , GetHealth () * 10.0f , #line 1055 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plPlacement . pl_PositionVector , - en_vGravityDir ); #line 1056 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1057 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1059 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::TestSurfaceDamage(CSurfaceType & stDn) #line 1060 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1062 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(stDn . st_fWalkDamageAmount > 0){ #line 1063 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TIME tmNow = _pTimer -> CurrentTick (); #line 1065 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(stDn . st_tmWalkDamageDelay > 0){ #line 1067 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(tmNow - en_tmLastSwimDamage > stDn . st_tmWalkDamageDelay + _pTimer -> TickQuantum ){ #line 1069 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastSwimDamage = tmNow + stDn . st_tmWalkDamageDelay ; #line 1070 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 1071 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1072 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1074 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(tmNow - en_tmLastSwimDamage > stDn . st_tmWalkDamageFrequency ){ #line 1076 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InflictDirectDamage (this , MiscDamageInflictor () , #line 1077 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (DamageType ) stDn . st_iWalkDamageType , stDn . st_fWalkDamageAmount , #line 1078 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plPlacement . pl_PositionVector , - en_vGravityDir ); #line 1079 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastSwimDamage = tmNow ; #line 1080 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1081 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1082 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1085 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::SendTouchEvent(const CClipMove & cmMove) #line 1086 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1087 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ETouch etouchThis ; #line 1088 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ETouch etouchOther ; #line 1089 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" etouchThis . penOther = cmMove . cm_penHit ; #line 1090 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" etouchThis . bThisMoved = FALSE ; #line 1091 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" etouchThis . plCollision = cmMove . cm_plClippedPlane ; #line 1092 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" etouchOther . penOther = this ; #line 1093 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" etouchOther . bThisMoved = TRUE ; #line 1094 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" etouchOther . plCollision = cmMove . cm_plClippedPlane ; #line 1095 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SendEvent (etouchThis ); #line 1096 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" cmMove . cm_penHit -> SendEvent (etouchOther ); #line 1097 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1100 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::SendBlockEvent(CClipMove & cmMove) #line 1101 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1102 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" EBlock eBlock ; #line 1103 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" eBlock . penOther = cmMove . cm_penHit ; #line 1104 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" eBlock . plCollision = cmMove . cm_plClippedPlane ; #line 1105 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SendEvent (eBlock ); #line 1106 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1108 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL CMovableEntity::IsStandingOnPolygon(CBrushPolygon * pbpo) #line 1109 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1110 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1112 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pciCollisionInfo == NULL #line 1113 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || ! (en_pciCollisionInfo -> ci_ulFlags & CIF_CANSTANDONHANDLE )){ #line 1115 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1116 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1117 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1120 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn -> bpo_pbscSector -> bsc_pbmBrushMip -> bm_pbrBrush -> br_penEntity -> en_ulCollisionFlags == 0){ #line 1122 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1123 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1125 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOATplane3D & plPolygon = pbpo -> bpo_pbplPlane -> bpl_plAbsolute ; #line 1127 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vHandle = en_plPlacement . pl_PositionVector ; #line 1128 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vHandle (1) += en_pciCollisionInfo -> ci_fHandleY * en_mRotation (1 , 2); #line 1129 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vHandle (2) += en_pciCollisionInfo -> ci_fHandleY * en_mRotation (2 , 2); #line 1130 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vHandle (3) += en_pciCollisionInfo -> ci_fHandleY * en_mRotation (3 , 2); #line 1131 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vHandle -= ((FLOAT3D &) plPolygon ) * en_pciCollisionInfo -> ci_fHandleR ; #line 1134 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(plPolygon . PointDistance (vHandle ) > 0.01f){ #line 1136 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1137 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1138 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1141 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX iMajorAxis1 , iMajorAxis2 ; #line 1142 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetMajorAxesForPlane (plPolygon , iMajorAxis1 , iMajorAxis2 ); #line 1145 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CIntersector isIntersector (vHandle (iMajorAxis1 ) , vHandle (iMajorAxis2 )); #line 1147 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FOREACHINSTATICARRAY (pbpo -> bpo_abpePolygonEdges , CBrushPolygonEdge , itbpePolygonEdge ){ #line 1149 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT3D & vVertex0 = itbpePolygonEdge -> bpe_pbedEdge -> bed_pbvxVertex0 -> bvx_vAbsolute ; #line 1150 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT3D & vVertex1 = itbpePolygonEdge -> bpe_pbedEdge -> bed_pbvxVertex1 -> bvx_vAbsolute ; #line 1152 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" isIntersector . AddEdge ( #line 1153 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vVertex0 (iMajorAxis1 ) , vVertex0 (iMajorAxis2 ) , #line 1154 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vVertex1 (iMajorAxis1 ) , vVertex1 (iMajorAxis2 )); #line 1155 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1158 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(isIntersector . IsIntersecting ()){ #line 1160 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1161 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return TRUE ; #line 1163 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1165 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1166 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1167 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1168 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1171 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL CMovableEntity::IsPolygonBelowPoint(CBrushPolygon * pbpo,const FLOAT3D & vPoint,FLOAT fMaxDist) #line 1172 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1173 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1176 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((pbpo -> bpo_ulFlags & BPOF_PASSABLE ) #line 1177 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || ! AllowForGroundPolygon (pbpo )){ #line 1179 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1180 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1181 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1184 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOATplane3D & plPolygon = pbpo -> bpo_pbplPlane -> bpl_plAbsolute ; #line 1187 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fCos = ((const FLOAT3D &) plPolygon ) % en_vGravityDir ; #line 1189 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fCos > - 0.01f){ #line 1191 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1192 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1193 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1196 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CSurfaceType & stReference = en_pwoWorld -> wo_astSurfaceTypes [ pbpo -> bpo_bppProperties . bpp_ubSurfaceType ]; #line 1197 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fCos >= - stReference . st_fClimbSlopeCos && fCos < 0 #line 1198 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || stReference . st_ulFlags & STF_SLIDEDOWNSLOPE ){ #line 1200 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1201 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1202 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1205 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fD = plPolygon . PointDistance (vPoint ); #line 1207 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fD < - 0.01f){ #line 1209 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1210 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1211 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1214 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fDistance = - fD / fCos ; #line 1216 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fDistance > fMaxDist ){ #line 1218 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1219 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1220 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1222 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vProjected = vPoint + en_vGravityDir * fDistance ; #line 1225 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX iMajorAxis1 , iMajorAxis2 ; #line 1226 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetMajorAxesForPlane (plPolygon , iMajorAxis1 , iMajorAxis2 ); #line 1229 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CIntersector isIntersector (vProjected (iMajorAxis1 ) , vProjected (iMajorAxis2 )); #line 1231 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FOREACHINSTATICARRAY (pbpo -> bpo_abpePolygonEdges , CBrushPolygonEdge , itbpePolygonEdge ){ #line 1233 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT3D & vVertex0 = itbpePolygonEdge -> bpe_pbedEdge -> bed_pbvxVertex0 -> bvx_vAbsolute ; #line 1234 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT3D & vVertex1 = itbpePolygonEdge -> bpe_pbedEdge -> bed_pbvxVertex1 -> bvx_vAbsolute ; #line 1236 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" isIntersector . AddEdge ( #line 1237 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vVertex0 (iMajorAxis1 ) , vVertex0 (iMajorAxis2 ) , #line 1238 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vVertex1 (iMajorAxis1 ) , vVertex1 (iMajorAxis2 )); #line 1239 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1242 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(isIntersector . IsIntersecting ()){ #line 1244 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1245 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return TRUE ; #line 1247 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1249 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_ISSTANDINGONPOLYGON ); #line 1250 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1251 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1252 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } BOOL CMovableEntity::AllowForGroundPolygon(CBrushPolygon * pbpo) #line 1256 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1257 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return TRUE ; #line 1258 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1261 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL CMovableEntity::IsSomeNearPolygonBelowPoint(const FLOAT3D & vPoint,FLOAT fMaxDist) #line 1262 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1264 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1265 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1268 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL CMovableEntity::IsSomeSectorPolygonBelowPoint(CBrushSector * pbsc,const FLOAT3D & vPoint,FLOAT fMaxDist) #line 1269 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1271 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FOREACHINSTATICARRAY (pbsc -> bsc_abpoPolygons , CBrushPolygon , itbpo ){ #line 1272 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CBrushPolygon * pbpo = itbpo ; #line 1274 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsPolygonBelowPoint (pbpo , vPoint , fMaxDist )){ #line 1276 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return TRUE ; #line 1277 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1278 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1280 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1281 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1284 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL CMovableEntity::WouldFallInNextPosition(void) #line 1285 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1287 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_fStepDnHeight < 0){ #line 1289 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1290 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1293 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn != NULL && #line 1294 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" IsPolygonBelowPoint (en_pbpoStandOn , en_vNextPosition , en_fStepDnHeight )){ #line 1296 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1297 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1300 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CListHead lhActiveSectors ; #line 1302 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CStaticStackArray < CBrushPolygon * > & apbpo = en_apbpoNearPolygons ; #line 1304 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" for(INDEX iPolygon = 0;iPolygon < apbpo . Count ();iPolygon ++){ #line 1305 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CBrushPolygon * pbpo = apbpo [ iPolygon ]; #line 1307 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsPolygonBelowPoint (pbpo , en_vNextPosition , en_fStepDnHeight )){ #line 1309 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" lhActiveSectors . RemAll (); #line 1310 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1311 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1313 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! pbpo -> bpo_pbscSector -> bsc_lnInActiveSectors . IsLinked ()){ #line 1315 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" lhActiveSectors . AddTail (pbpo -> bpo_pbscSector -> bsc_lnInActiveSectors ); #line 1316 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1317 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1322 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL && en_penReference -> en_RenderType == RT_BRUSH #line 1323 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && ! (en_penReference -> en_ulFlags & ENF_ZONING ) #line 1324 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && en_penReference -> en_pbrBrush != NULL ){ #line 1326 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CBrushMip * pbmMip = en_penReference -> en_pbrBrush -> GetFirstMip (); #line 1328 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FOREACHINDYNAMICARRAY (pbmMip -> bm_abscSectors , CBrushSector , itbsc ){ #line 1330 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! itbsc -> bsc_lnInActiveSectors . IsLinked ()){ #line 1332 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" lhActiveSectors . AddTail (itbsc -> bsc_lnInActiveSectors ); #line 1333 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1334 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1335 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1338 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {FOREACHSRCOFDST (en_rdSectors , CBrushSector , bsc_rsEntities , pbsc ); #line 1340 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! pbsc -> bsc_lnInActiveSectors . IsLinked ()){ #line 1342 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" lhActiveSectors . AddTail (pbsc -> bsc_lnInActiveSectors ); #line 1343 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1344 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ENDFOR ;} #line 1347 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bSupportFound = FALSE ; #line 1348 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FOREACHINLIST (CBrushSector , bsc_lnInActiveSectors , lhActiveSectors , itbsc ){ #line 1349 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CBrushSector * pbsc = itbsc ; #line 1351 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pbsc -> bsc_pbmBrushMip -> bm_pbrBrush -> br_penEntity -> en_ulFlags & ENF_ZONING ){ #line 1353 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {FOREACHDSTOFSRC (pbsc -> bsc_rsEntities , CEntity , en_rdSectors , pen ); #line 1354 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pen -> en_RenderType == CEntity :: RT_TERRAIN ){ #line 1355 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsTerrainBelowPoint (pen -> en_ptrTerrain , en_vNextPosition , en_fStepDnHeight , en_vGravityDir )){ #line 1356 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bSupportFound = TRUE ; #line 1357 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" goto out ; #line 1358 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1359 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" continue ; #line 1360 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1361 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pen -> en_RenderType != CEntity :: RT_BRUSH && #line 1362 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" pen -> en_RenderType != CEntity :: RT_FIELDBRUSH ){ #line 1363 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" break ; #line 1364 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1366 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CBrushMip * pbmMip = pen -> en_pbrBrush -> GetFirstMip (); #line 1368 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FOREACHINDYNAMICARRAY (pbmMip -> bm_abscSectors , CBrushSector , itbscInMip ){ #line 1370 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! itbscInMip -> bsc_lnInActiveSectors . IsLinked ()){ #line 1372 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" lhActiveSectors . AddTail (itbscInMip -> bsc_lnInActiveSectors ); #line 1373 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1374 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1375 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ENDFOR ;} #line 1376 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1378 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsSomeSectorPolygonBelowPoint (itbsc , en_vNextPosition , en_fStepDnHeight )){ #line 1380 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bSupportFound = TRUE ; #line 1381 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" break ; #line 1382 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1383 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1384 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" out :; #line 1387 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" lhActiveSectors . RemAll (); #line 1390 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ! bSupportFound ; #line 1391 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1394 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::ClearNextPosition(void) #line 1395 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1396 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = en_plPlacement . pl_PositionVector ; #line 1397 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mNextRotation = en_mRotation ; #line 1398 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1400 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::SetPlacementFromNextPosition(void) #line 1401 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1402 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_SETPLACEMENTFROMNEXTPOSITION ); #line 1404 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementTimerAveragingCounter (CPhysicsProfile :: PTI_SETPLACEMENTFROMNEXTPOSITION ); #line 1405 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPlacement3D plNew ; #line 1406 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" plNew . pl_PositionVector = en_vNextPosition ; #line 1407 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DecomposeRotationMatrixNoSnap (plNew . pl_OrientationAngle , en_mNextRotation ); #line 1408 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D mRotation ; #line 1409 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" MakeRotationMatrixFast (mRotation , plNew . pl_OrientationAngle ); #line 1410 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SetPlacement_internal (plNew , mRotation , TRUE ); #line 1424 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_SETPLACEMENTFROMNEXTPOSITION ); #line 1425 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1427 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL CMovableEntity::TryToGoUpstairs(const FLOAT3D & vTranslationAbsolute,const CSurfaceType & stHit, #line 1428 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bHitStairsOrg) #line 1429 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1430 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_TRYTOGOUPSTAIRS ); #line 1431 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementTimerAveragingCounter (CPhysicsProfile :: PTI_TRYTOGOUPSTAIRS ); #line 1434 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vTranslationHorizontal ; #line 1435 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetNormalComponent (vTranslationAbsolute , en_vGravityDir , vTranslationHorizontal ); #line 1439 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(vTranslationHorizontal . Length () < 0.001f){ #line 1442 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOGOUPSTAIRS ); #line 1443 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1444 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1445 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vTranslationHorizontalOrg = vTranslationHorizontal ; #line 1447 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! bHitStairsOrg ){ #line 1449 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationHorizontal . Normalize (); #line 1450 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationHorizontal *= 0.5f; #line 1451 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1454 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPlacement3D plOriginal = en_plPlacement ; #line 1457 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fStairsHeight = 0; #line 1458 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(stHit . st_fStairsHeight > 0){ #line 1459 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fStairsHeight = Max (stHit . st_fStairsHeight , en_fStepUpHeight ); #line 1460 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(stHit . st_fStairsHeight < 0){ #line 1461 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fStairsHeight = Min (stHit . st_fStairsHeight , en_fStepUpHeight ); #line 1462 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1464 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CContentType & ctDn = en_pwoWorld -> wo_actContentTypes [ en_iDnContent ]; #line 1465 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CContentType & ctUp = en_pwoWorld -> wo_actContentTypes [ en_iUpContent ]; #line 1468 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bGettingOutOfWater = FALSE ; #line 1469 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((ctDn . ct_ulFlags & CTF_SWIMABLE ) && ! (ctUp . ct_ulFlags & CTF_SWIMABLE ) #line 1470 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && en_fImmersionFactor > 0.3f){ #line 1472 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pciCollisionInfo != NULL ){ #line 1473 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fStairsHeight = fStairsHeight * 2 + en_fImmersionFactor * #line 1474 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (en_pciCollisionInfo -> ci_fMaxHeight - en_pciCollisionInfo -> ci_fMinHeight ); #line 1476 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bGettingOutOfWater = TRUE ; #line 1477 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1478 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1481 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D avTranslation [ 3 ]; #line 1482 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" avTranslation [ 0 ] = en_vGravityDir * - fStairsHeight ; #line 1483 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" avTranslation [ 1 ] = vTranslationHorizontal ; #line 1484 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" avTranslation [ 2 ] = en_vGravityDir * fStairsHeight ; #line 1487 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" for(INDEX iStep = 0;iStep < 3;iStep ++){ #line 1488 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bStepOK = TRUE ; #line 1490 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = en_plPlacement . pl_PositionVector + avTranslation [ iStep ]; #line 1491 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mNextRotation = en_mRotation ; #line 1493 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CClipMove cm (this ); #line 1494 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pwoWorld -> ClipMove (cm ); #line 1497 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cm . cm_fMovementFraction < 1.0f){ #line 1499 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX iSurfaceHit = 0; #line 1500 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bHitStairsNow = FALSE ; #line 1501 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cm . cm_pbpoHit != NULL ){ #line 1502 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bHitStairsNow = cm . cm_pbpoHit -> bpo_ulFlags & BPOF_STAIRS ; #line 1503 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iSurfaceHit = cm . cm_pbpoHit -> bpo_bppProperties . bpp_ubSurfaceType ; #line 1504 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1505 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CSurfaceType & stHit = en_pwoWorld -> wo_astSurfaceTypes [ iSurfaceHit ]; #line 1509 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT3D & vHitPlane = cm . cm_plClippedPlane ; #line 1510 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPlaneDotG = vHitPlane % en_vGravityDir ; #line 1511 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPlaneDotGAbs = Abs (fPlaneDotG ); #line 1513 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bSlidingAllowed = (fPlaneDotGAbs > - 0.01f && fPlaneDotGAbs < 0.99f) && bHitStairsOrg ; #line 1515 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bEarlyClipAllowed = #line 1517 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iStep == 0 || #line 1519 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iStep == 1 && bHitStairsNow || #line 1521 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" iStep == 2 && #line 1522 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (vHitPlane % en_vGravityDir < - stHit . st_fClimbSlopeCos || #line 1523 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bHitStairsNow ); #line 1526 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bEarlyClipAllowed || bSlidingAllowed ){ #line 1528 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = en_plPlacement . pl_PositionVector + #line 1529 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" avTranslation [ iStep ] * (cm . cm_fMovementFraction * 0.98f); #line 1530 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bSlidingAllowed && iStep != 2){ #line 1531 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vSliding = cm . cm_plClippedPlane . ProjectDirection ( #line 1532 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" avTranslation [ iStep ] * (1.0f - cm . cm_fMovementFraction )) + #line 1533 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vHitPlane * (ClampUp (avTranslation [ iStep ] . Length () , 0.5f) / 100.0f); #line 1534 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition += vSliding ; #line 1535 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1536 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CClipMove cm (this ); #line 1537 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pwoWorld -> ClipMove (cm ); #line 1539 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cm . cm_fMovementFraction <= 1.0f){ #line 1541 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bStepOK = FALSE ; #line 1542 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1544 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1546 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bStepOK = FALSE ; #line 1547 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1548 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1551 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bStepOK ){ #line 1553 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SetPlacementFromNextPosition (); #line 1555 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1557 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = plOriginal . pl_PositionVector ; #line 1558 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SetPlacementFromNextPosition (); #line 1560 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOGOUPSTAIRS ); #line 1562 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1563 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1565 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1571 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! bGettingOutOfWater ){ #line 1572 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation += vTranslationHorizontalOrg ; #line 1573 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1575 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOGOUPSTAIRS ); #line 1577 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return TRUE ; #line 1578 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1581 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL CMovableEntity::TryToMove(CMovableEntity * penPusher,BOOL bTranslate,BOOL bRotate) #line 1582 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1585 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penPusher != NULL ){ #line 1586 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _ctTryToMoveCheckCounter --; #line 1587 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1588 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _ctTryToMoveCheckCounter -= 4; #line 1589 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1591 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_ctTryToMoveCheckCounter < 0){ #line 1593 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1594 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1595 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1596 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementTimerAveragingCounter (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1597 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_TRYTOMOVE ); #line 1600 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bTranslate ){ #line 1601 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = en_plPlacement . pl_PositionVector + en_vMoveTranslation ; #line 1618 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1619 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vNextPosition = en_plPlacement . pl_PositionVector ; #line 1620 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1621 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bRotate ){ #line 1623 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mNextRotation = en_mMoveRotation * en_mRotation ; #line 1624 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1625 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mNextRotation = en_mRotation ; #line 1626 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1629 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ULONG ulCIFlags = en_pciCollisionInfo -> ci_ulFlags ; #line 1630 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bIgnoreRotation = ! bRotate || #line 1631 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((ulCIFlags & CIF_IGNOREROTATION ) || #line 1632 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((ulCIFlags & CIF_IGNOREHEADING ) && #line 1633 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (en_mMoveRotation (1 , 2) == 0 && en_mMoveRotation (2 , 2) == 1 && en_mMoveRotation (3 , 2) == 0))); #line 1636 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CClipMove cmMove (this ); #line 1638 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! bTranslate && bIgnoreRotation ){ #line 1639 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" cmMove . cm_fMovementFraction = 2.0f; #line 1640 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_TRYTOMOVE_FAST ); #line 1641 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1642 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pwoWorld -> ClipMove (cmMove ); #line 1643 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1646 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cmMove . cm_fMovementFraction > 1.0f){ #line 1650 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bTranslate && en_penReference != NULL && #line 1651 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (en_ulPhysicsFlags & EPF_TRANSLATEDBYGRAVITY ) && #line 1652 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ! (en_ulPhysicsFlags & (EPF_ONSTEEPSLOPE | EPF_ORIENTINGTOGRAVITY | EPF_FLOATING )) && #line 1653 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penPusher == NULL && WouldFallInNextPosition ()){ #line 1655 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SendEvent (EWouldFall ()); #line 1657 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1658 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1660 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SetPlacementFromNextPosition (); #line 1661 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bTranslate ){ #line 1662 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation += en_vMoveTranslation ; #line 1663 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1664 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bRotate ){ #line 1665 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mAppliedRotation = en_mMoveRotation * en_mAppliedRotation ; #line 1666 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1668 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_TRYTOMOVE_PASS ); #line 1669 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1671 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return TRUE ; #line 1674 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1675 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_TRYTOMOVE_CLIP ); #line 1695 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_ctTryToMoveCheckCounter <= 0){ #line 1697 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1698 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1699 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1702 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cmMove . cm_pbpoHit != NULL ){ #line 1704 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((cmMove . cm_pbpoHit -> bpo_ulFlags & BPOF_STAIRS ) #line 1705 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && ((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_CLIMBORSLIDE )){ #line 1707 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" cmMove . cm_plClippedPlane = FLOATplane3D (- en_vGravityDir , 0); #line 1708 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1710 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" INDEX iSurface = cmMove . cm_pbpoHit -> bpo_bppProperties . bpp_ubSurfaceType ; #line 1711 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pwoWorld -> wo_astSurfaceTypes [ iSurface ] . st_ulFlags & STF_NOIMPACT ){ #line 1713 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_NOIMPACTTHISTICK ; #line 1714 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1715 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1719 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_TRANSLATEDBYGRAVITY ) && ! (en_ulPhysicsFlags & EPF_FLOATING ) #line 1720 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && ( #line 1721 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((en_vGravityDir % (FLOAT3D &) cmMove . cm_plClippedPlane ) #line 1722 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" < (en_vGravityDir % en_vReferencePlane )))){ #line 1724 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_penReference = cmMove . cm_penHit ; #line 1726 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane = (FLOAT3D &) cmMove . cm_plClippedPlane ; #line 1727 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = cmMove . cm_pbpoHit ; #line 1728 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cmMove . cm_pbpoHit == NULL ){ #line 1729 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_iReferenceSurface = 0; #line 1730 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1731 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_iReferenceSurface = cmMove . cm_pbpoHit -> bpo_bppProperties . bpp_ubSurfaceType ; #line 1732 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1733 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1736 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SendTouchEvent (cmMove ); #line 1739 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cmMove . cm_penHit -> en_ulPhysicsFlags & EPF_NOIMPACT ){ #line 1741 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_NOIMPACTTHISTICK ; #line 1742 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1745 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vBounce ; #line 1746 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bBounce = FALSE ; #line 1747 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_BOUNCE ) && bTranslate ){ #line 1749 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vParallel , vNormal ; #line 1750 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetParallelAndNormalComponents (en_vMoveTranslation , cmMove . cm_plClippedPlane , #line 1751 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vNormal , vParallel ); #line 1752 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vNormal *= - en_fBounceDampNormal ; #line 1753 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vParallel *= + en_fBounceDampParallel ; #line 1754 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vBounce = vNormal + vParallel ; #line 1756 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(vNormal . Length () > 0.1f){ #line 1758 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bBounce = TRUE ; #line 1759 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1761 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative *= en_fBounceDampParallel ; #line 1762 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_aDesiredRotationRelative . Length () < 10){ #line 1763 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = ANGLE3D (0 , 0 , 0); #line 1764 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1765 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1768 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penPusher != NULL && (cmMove . cm_penHit -> en_ulPhysicsFlags & EPF_PUSHABLE )){ #line 1769 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableModelEntity * penBlocking = ((CMovableModelEntity *) cmMove . cm_penHit ); #line 1771 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vRadius = cmMove . cm_penHit -> en_plPlacement . pl_PositionVector - #line 1772 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penPusher -> en_plPlacement . pl_PositionVector ; #line 1773 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vPush = (vRadius * penPusher -> en_mMoveRotation - vRadius ); #line 1775 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vPush += penPusher -> en_vMoveTranslation ; #line 1778 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penBlocking -> en_vMoveTranslation = vPush ; #line 1779 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penBlocking -> en_mMoveRotation = penPusher -> en_mMoveRotation ; #line 1782 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penBlocking -> AddToMoversDuringMoving (); #line 1784 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1785 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bUnblocked = penBlocking -> TryToMove (penPusher , bTranslate , bRotate ); #line 1786 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1788 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bUnblocked ){ #line 1790 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearNextPosition (); #line 1791 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1792 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return TryToMove (penPusher , bTranslate , bRotate ); #line 1793 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1795 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SendBlockEvent (cmMove ); #line 1796 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearNextPosition (); #line 1797 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1798 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1799 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1801 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if( #line 1802 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_SLIDE ) || #line 1803 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_BOUNCE ) || #line 1804 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_CLIMBORSLIDE ) || #line 1805 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_STOPEXACT )){ #line 1808 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bTranslate ){ #line 1811 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vSliding ; #line 1813 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_ctSliding == 0){ #line 1815 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideOffDir = cmMove . cm_plClippedPlane ; #line 1817 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vSliding = cmMove . cm_plClippedPlane . ProjectDirection ( #line 1818 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vMoveTranslation * (1.0f - cmMove . cm_fMovementFraction )); #line 1819 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _ctSliding ++; #line 1821 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(_ctSliding == 1){ #line 1823 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideOffDir += cmMove . cm_plClippedPlane ; #line 1825 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideDir = _vSlideOffDir * (FLOAT3D &) cmMove . cm_plClippedPlane ; #line 1826 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_vSlideDir . Length () > 0.001f){ #line 1827 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideDir . Normalize (); #line 1828 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1829 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _ctSliding ++; #line 1831 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetParallelComponent (en_vMoveTranslation * (1.0f - cmMove . cm_fMovementFraction ) , #line 1832 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideDir , vSliding ); #line 1834 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1836 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideOffDir += cmMove . cm_plClippedPlane ; #line 1838 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideDir = cmMove . cm_plClippedPlane . ProjectDirection (_vSlideDir ); #line 1839 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _ctSliding ++; #line 1841 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetParallelComponent (en_vMoveTranslation * (1.0f - cmMove . cm_fMovementFraction ) , #line 1842 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _vSlideDir , vSliding ); #line 1843 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1844 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (IsValidFloat (vSliding (1))); #line 1845 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (IsValidFloat (_vSlideDir (1))); #line 1846 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (IsValidFloat (_vSlideOffDir (1))); #line 1849 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(cmMove . cm_pbpoHit != NULL ){ #line 1850 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CSurfaceType & stHit = en_pwoWorld -> wo_astSurfaceTypes [ #line 1851 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" cmMove . cm_pbpoHit -> bpo_bppProperties . bpp_ubSurfaceType ]; #line 1853 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penPusher == NULL #line 1854 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && (en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_CLIMBORSLIDE ){ #line 1862 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D & vHitPlane = (FLOAT3D &) cmMove . cm_plClippedPlane ; #line 1863 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bHitStairs = cmMove . cm_pbpoHit -> bpo_ulFlags & BPOF_STAIRS ; #line 1866 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((vHitPlane % en_vGravityDir > - stHit . st_fClimbSlopeCos ) #line 1867 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || bHitStairs ){ #line 1870 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fSlidingVertical2 = en_vMoveTranslation % en_vGravityDir ; #line 1871 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fSlidingVertical2 *= fSlidingVertical2 ; #line 1872 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fSliding2 = en_vMoveTranslation % en_vMoveTranslation ; #line 1873 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((2 * fSlidingVertical2 <= fSliding2 ) #line 1875 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && TryToGoUpstairs (en_vMoveTranslation , stHit , bHitStairs )){ #line 1877 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1878 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1879 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1880 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1881 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1882 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1884 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_STOPEXACT ){ #line 1886 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vSliding = FLOAT3D (0 , 0 , 0); #line 1887 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1889 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (IsValidFloat (vSliding (1))); #line 1892 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vSliding += _vSlideOffDir * #line 1893 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ClampUp (en_vMoveTranslation . Length () , 0.5f) / 100.0f); #line 1896 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_vMoveTranslation . Length () > 0.001f && cmMove . cm_fMovementFraction > 0.002f){ #line 1898 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vSliding += en_vMoveTranslation * (cmMove . cm_fMovementFraction * 0.985f); #line 1899 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1902 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(vSliding . ManhattanNorm () < 0.001f){ #line 1903 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1904 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1905 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1908 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vMoveTranslation = vSliding ; #line 1909 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearNextPosition (); #line 1910 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1911 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TryToMove (penPusher , bTranslate , bRotate ); #line 1913 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bBounce ){ #line 1915 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation = vBounce ; #line 1917 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_penReference = NULL ; #line 1918 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane = FLOAT3D (0.0f , 0.0f , 0.0f); #line 1919 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_iReferenceSurface = 0; #line 1920 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1923 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1926 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(bRotate ){ #line 1928 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_BOUNCE ){ #line 1930 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative *= en_fBounceDampParallel ; #line 1931 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_aDesiredRotationRelative . Length () < 10){ #line 1932 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = ANGLE3D (0 , 0 , 0); #line 1933 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1934 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1936 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1937 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1939 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vMoveTranslation = cmMove . cm_vClippedLine * - 1.2f; #line 1941 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearNextPosition (); #line 1942 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1943 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TryToMove (penPusher , TRUE , bRotate ); #line 1945 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1946 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1948 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1949 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1952 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 1954 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SendBlockEvent (cmMove ); #line 1955 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearNextPosition (); #line 1956 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_TRYTOTRANSLATE ); #line 1957 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return FALSE ; #line 1958 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1959 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 1960 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::ClearMovingTemp(void) #line 1984 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 1988 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearNextPosition (); #line 1989 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CLEARMEM (en_vMoveTranslation ); #line 1990 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CLEARMEM (en_mMoveRotation ); #line 1991 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CLEARMEM (en_vAppliedTranslation ); #line 1992 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CLEARMEM (en_mAppliedRotation ); #line 1993 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::PreMoving(void) #line 1997 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 2006 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_pNetwork -> ga_ulDemoMinorVersion <= 5){ #line 2007 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" PreMovingOld (); #line 2008 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2009 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" PreMovingNew (); #line 2010 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2011 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2012 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::PreMovingNew(void) #line 2013 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 2014 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pciCollisionInfo == NULL ){ #line 2015 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 2016 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2022 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_PREMOVING ); #line 2023 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementTimerAveragingCounter (CPhysicsProfile :: PTI_PREMOVING ); #line 2026 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plLastPlacement = en_plPlacement ; #line 2029 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {FOREACHINLIST (CEntity , en_lnInParent , en_lhChildren , itenChild ){ #line 2031 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((itenChild -> en_ulPhysicsFlags & EPF_MOVABLE ) #line 2032 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && ! ((CMovableEntity *) & * itenChild ) -> en_lnInMovers . IsLinked ()){ #line 2033 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penChild = ((CMovableEntity *) & * itenChild ); #line 2035 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penChild -> en_plLastPlacement = penChild -> en_plPlacement ; #line 2036 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2037 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }} #line 2039 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fTickQuantum = _pTimer -> TickQuantum ; #line 2042 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(dbg_bBreak ){ #line 2043 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" dbg_bBreak = FALSE ; #line 2044 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" try { #line 2045 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" Breakpoint (); #line 2046 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }catch (ANYEXCEPTION ){ #line 2047 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPrintF ("Breakpoint!\n"); #line 2048 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }; #line 2049 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2057 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT fMaxSpeed = 300.0f; #line 2058 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (1) = Clamp (en_vCurrentTranslationAbsolute (1) , - fMaxSpeed , + fMaxSpeed ); #line 2059 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (2) = Clamp (en_vCurrentTranslationAbsolute (2) , - fMaxSpeed , + fMaxSpeed ); #line 2060 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (3) = Clamp (en_vCurrentTranslationAbsolute (3) , - fMaxSpeed , + fMaxSpeed ); #line 2063 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_RenderType == RT_MODEL || en_RenderType == RT_EDITORMODEL || #line 2064 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_RenderType == RT_SKAMODEL || en_RenderType == RT_SKAEDITORMODEL ){ #line 2066 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestFields (en_iUpContent , en_iDnContent , en_fImmersionFactor ); #line 2068 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_STICKYFEET ){ #line 2070 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vPoint ; #line 2071 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATplane3D plPlane ; #line 2072 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fDistanceToEdge ; #line 2073 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(GetNearestPolygon (vPoint , plPlane , fDistanceToEdge )){ #line 2074 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vGravityDir = - (FLOAT3D &) plPlane ; #line 2075 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2076 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2077 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2078 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CContentType & ctDn = en_pwoWorld -> wo_actContentTypes [ en_iDnContent ]; #line 2079 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CContentType & ctUp = en_pwoWorld -> wo_actContentTypes [ en_iUpContent ]; #line 2082 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestBreathing (ctUp ); #line 2084 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestContentDamage (ctDn , en_fImmersionFactor ); #line 2086 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL ){ #line 2087 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CSurfaceType & stReference = en_pwoWorld -> wo_astSurfaceTypes [ en_iReferenceSurface ]; #line 2088 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestSurfaceDamage (stReference ); #line 2089 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2092 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fBouyancy = (1 - #line 2093 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ctDn . ct_fDensity / en_fDensity ) * en_fImmersionFactor - #line 2094 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ctUp . ct_fDensity / en_fDensity ) * (1 - en_fImmersionFactor )); #line 2095 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fSpeedModifier = #line 2096 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctDn . ct_fSpeedMultiplier * en_fImmersionFactor + #line 2097 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctUp . ct_fSpeedMultiplier * (1 - en_fImmersionFactor ); #line 2098 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFluidFriction = #line 2099 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctDn . ct_fFluidFriction * en_fImmersionFactor + #line 2100 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctUp . ct_fFluidFriction * (1 - en_fImmersionFactor ); #line 2101 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fControlMultiplier = #line 2102 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctDn . ct_fControlMultiplier * en_fImmersionFactor + #line 2103 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctUp . ct_fControlMultiplier * (1 - en_fImmersionFactor ); #line 2106 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vDesiredTranslationAbsolute = en_vDesiredTranslationRelative ; #line 2108 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! (en_ulPhysicsFlags & EPF_ABSOLUTETRANSLATE )){ #line 2109 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute *= en_mRotation ; #line 2110 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2112 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute *= fTickQuantum ; #line 2113 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ANGLE3D aRotationRelative ; #line 2114 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" aRotationRelative (1) = en_aDesiredRotationRelative (1) * fTickQuantum ; #line 2115 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" aRotationRelative (2) = en_aDesiredRotationRelative (2) * fTickQuantum ; #line 2116 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" aRotationRelative (3) = en_aDesiredRotationRelative (3) * fTickQuantum ; #line 2118 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D mRotationAbsolute ; #line 2120 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_PUSH ){ #line 2121 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D mNewRotation ; #line 2122 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" MakeRotationMatrixFast (mNewRotation , en_plPlacement . pl_OrientationAngle + aRotationRelative ); #line 2123 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = mNewRotation * ! en_mRotation ; #line 2125 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2126 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" MakeRotationMatrixFast (mRotationAbsolute , aRotationRelative ); #line 2127 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = en_mRotation * (mRotationAbsolute * ! en_mRotation ); #line 2128 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2131 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute *= fSpeedModifier ; #line 2134 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fJump = - en_mRotation . GetColumn (2) % vDesiredTranslationAbsolute ; #line 2136 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bReferenceMovingInY = FALSE ; #line 2137 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bReferenceRotatingNonY = FALSE ; #line 2139 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL && (en_penReference -> en_ulPhysicsFlags & EPF_MOVABLE )){ #line 2140 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penReference = (CMovableEntity *) (CEntity *) en_penReference ; #line 2142 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT3D & vReferenceTranslation = penReference -> en_vIntendedTranslation ; #line 2143 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOATmatrix3D & mReferenceRotation = penReference -> en_mIntendedRotation ; #line 2145 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vRadius = en_plPlacement . pl_PositionVector #line 2146 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - penReference -> en_plPlacement . pl_PositionVector ; #line 2147 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vReferenceDelta = vReferenceTranslation + vRadius * mReferenceRotation - vRadius ; #line 2149 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute += vReferenceDelta ; #line 2150 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = mReferenceRotation * mRotationAbsolute ; #line 2153 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bReferenceMovingInY = (vReferenceDelta % en_vGravityDir != 0.0f); #line 2154 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bReferenceRotatingNonY = ((en_vGravityDir * mReferenceRotation ) % en_vGravityDir ) > 0.01f; #line 2155 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2157 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vTranslationAbsolute = en_vCurrentTranslationAbsolute * fTickQuantum ; #line 2160 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_ORIENTINGTOGRAVITY ; #line 2162 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_ORIENTEDBYGRAVITY ){ #line 2164 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vDown ; #line 2165 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDown (1) = - en_mRotation (1 , 2); #line 2166 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDown (2) = - en_mRotation (2 , 2); #line 2167 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDown (3) = - en_mRotation (3 , 2); #line 2170 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fCos = vDown % en_vGravityDir ; #line 2172 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fCos < 0.99999f){ #line 2174 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_ORIENTINGTOGRAVITY ; #line 2177 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ANGLE a = ACos (fCos ); #line 2178 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(Abs (a ) > 20){ #line 2179 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" a = 20 * Sgn (a ); #line 2180 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2181 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fRad = RadAngle (a ); #line 2184 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vAxis = vDown * en_vGravityDir ; #line 2185 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fLen = vAxis . Length (); #line 2186 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fLen < 0.01f){ #line 2187 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis (1) = en_mRotation (1 , 3); #line 2188 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis (2) = en_mRotation (2 , 3); #line 2189 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis (3) = en_mRotation (3 , 3); #line 2192 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(! bReferenceRotatingNonY ){ #line 2193 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fRad /= fLen ; #line 2194 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2195 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis *= fRad ; #line 2198 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D mGRotation ; #line 2199 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mGRotation (1 , 1) = 1;mGRotation (1 , 2) = - vAxis (3);mGRotation (1 , 3) = vAxis (2); #line 2200 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mGRotation (2 , 1) = vAxis (3);mGRotation (2 , 2) = 1;mGRotation (2 , 3) = - vAxis (1); #line 2201 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mGRotation (3 , 1) = - vAxis (2);mGRotation (3 , 2) = vAxis (1);mGRotation (3 , 3) = 1; #line 2202 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" OrthonormalizeRotationMatrix (mGRotation ); #line 2205 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = mGRotation * mRotationAbsolute ; #line 2206 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2207 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2210 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_FLOATING ; #line 2212 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT ACC = en_fAcceleration * fTickQuantum * fTickQuantum ; #line 2213 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT DEC = en_fDeceleration * fTickQuantum * fTickQuantum ; #line 2215 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! (en_ulPhysicsFlags & EPF_TRANSLATEDBYGRAVITY )){ #line 2217 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_NOACCELERATION ){ #line 2218 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute = vDesiredTranslationAbsolute ; #line 2219 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2220 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , vDesiredTranslationAbsolute , #line 2221 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fControlMultiplier , #line 2222 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fControlMultiplier ); #line 2223 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2225 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if((fBouyancy * en_fGravityA < 0.5f && (ctDn . ct_ulFlags & (CTF_SWIMABLE | CTF_FLYABLE )))){ #line 2227 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_FLOATING ; #line 2229 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_NOACCELERATION ){ #line 2230 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute = vDesiredTranslationAbsolute ; #line 2231 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2232 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , vDesiredTranslationAbsolute , #line 2233 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fControlMultiplier , #line 2234 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fControlMultiplier ); #line 2235 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2238 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fBouyancy < - 0.1f){ #line 2239 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2240 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * - fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2241 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , en_vGravityDir * - fGV , fGA , fGA ); #line 2242 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(fBouyancy > + 0.1f){ #line 2243 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2244 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2245 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , en_vGravityDir * fGV , fGA , fGA ); #line 2246 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2249 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2250 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bGravityAlongPolygon = TRUE ; #line 2252 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn == NULL || ! IsStandingOnPolygon (en_pbpoStandOn ) || bReferenceMovingInY #line 2253 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || (en_ulPhysicsFlags & EPF_ORIENTINGTOGRAVITY )){ #line 2255 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 2256 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference == NULL || bReferenceMovingInY ){ #line 2257 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bGravityAlongPolygon = FALSE ; #line 2258 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2259 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2262 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! bGravityAlongPolygon ){ #line 2263 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_GRAVITY_NONTRIVIAL ); #line 2266 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2267 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2268 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddGAcceleration (vTranslationAbsolute , en_vGravityDir , fGA , fGV ); #line 2270 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2271 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_GRAVITY_TRIVIAL ); #line 2274 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vPolygonDir = - en_vReferencePlane ; #line 2276 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vGParallel , vGNormal ; #line 2277 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetParallelAndNormalComponents (en_vGravityDir , vPolygonDir , vGNormal , vGParallel ); #line 2279 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFactor = vGParallel . Length (); #line 2281 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fFactor > 0.001f){ #line 2282 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2283 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2284 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddGAcceleration (vTranslationAbsolute , vGParallel / fFactor , fGA * fFactor , fGV * fFactor ); #line 2285 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2288 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPolyGA = (vPolygonDir % en_vGravityDir ) * en_fGravityA ; #line 2289 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fYSpeed = vPolygonDir % vTranslationAbsolute ; #line 2290 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fYSpeed > 0 && fYSpeed < fPolyGA ){ #line 2291 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute -= vPolygonDir * fYSpeed ; #line 2292 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2295 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_BOUNCE ){ #line 2297 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative *= en_fJumpControlMultiplier ; #line 2298 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_aDesiredRotationRelative . Length () < 10){ #line 2299 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = ANGLE3D (0 , 0 , 0); #line 2300 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2301 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2302 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2304 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CSurfaceType & stReference = en_pwoWorld -> wo_astSurfaceTypes [ en_iReferenceSurface ]; #line 2307 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL ){ #line 2308 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPlaneY = (en_vGravityDir % en_vReferencePlane ); #line 2309 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPlaneYAbs = Abs (fPlaneY ); #line 2310 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFriction = stReference . st_fFriction ; #line 2312 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fPlaneY >= - stReference . st_fClimbSlopeCos && fPlaneY < 0 #line 2313 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || (stReference . st_ulFlags & STF_SLIDEDOWNSLOPE ) && fPlaneY > - 0.99f){ #line 2314 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_ONSTEEPSLOPE ; #line 2316 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAccelerationOnPlane2 ( #line 2317 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute , #line 2318 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute , #line 2319 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2320 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2321 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane , #line 2322 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vGravityDir ); #line 2324 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2325 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_ONSTEEPSLOPE ; #line 2327 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAccelerationOnPlane ( #line 2328 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute , #line 2329 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute , #line 2330 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2331 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2332 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane ); #line 2333 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2335 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fJump < - 0.01f && (fPlaneY < - stReference . st_fJumpSlopeCos #line 2336 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || _pTimer -> CurrentTick () > en_tmLastSignificantVerticalMovement + 0.25f)){ #line 2338 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute += en_vGravityDir * fJump ; #line 2339 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmJumped = _pTimer -> CurrentTick (); #line 2340 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 2341 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2344 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2346 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_pTimer -> CurrentTick () - en_tmJumped < en_tmMaxJumpControl ){ #line 2348 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAccelerationOnPlane ( #line 2349 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute , #line 2350 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute , #line 2351 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fControlMultiplier * en_fJumpControlMultiplier , #line 2352 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fControlMultiplier * en_fJumpControlMultiplier , #line 2353 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATplane3D (en_vGravityDir , 0)); #line 2354 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2357 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fJump < - 0.01f && #line 2358 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pTimer -> CurrentTick () > en_tmLastSignificantVerticalMovement + 0.25f){ #line 2360 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute += en_vGravityDir * fJump ; #line 2361 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmJumped = _pTimer -> CurrentTick (); #line 2362 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 2363 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2364 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2365 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2369 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CheckAndAddGAcceleration (this , vTranslationAbsolute , fTickQuantum ); #line 2372 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fFluidFriction > 0.01f){ #line 2374 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , FLOAT3D (0.0f , 0.0f , 0.0f) , #line 2375 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" 0.0f , DEC * fFluidFriction ); #line 2376 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2379 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_CANFADESPINNING ) && #line 2380 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((ctDn . ct_ulFlags & CTF_FADESPINNING ) || (ctUp . ct_ulFlags & CTF_FADESPINNING ))){ #line 2382 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative *= (1 - fSpeedModifier * 0.05f); #line 2383 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_aDesiredRotationRelative . Length () < 10){ #line 2384 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = ANGLE3D (0 , 0 , 0); #line 2385 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2386 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2389 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn == NULL && (vTranslationAbsolute . ManhattanNorm () > 1E-5f || #line 2390 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane % en_vGravityDir < 0.0f)){ #line 2391 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_penReference = NULL ; #line 2392 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane = FLOAT3D (0.0f , 0.0f , 0.0f); #line 2393 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_iReferenceSurface = 0; #line 2394 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2396 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vIntendedTranslation = vTranslationAbsolute ; #line 2397 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mIntendedRotation = mRotationAbsolute ; #line 2402 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATaabbox3D box ; #line 2403 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pciCollisionInfo -> MakeBoxAtPlacement (FLOAT3D (0 , 0 , 0) , en_mRotation , box ); #line 2405 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {CLightSource * pls = GetLightSource (); #line 2406 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pls != NULL && ! (pls -> ls_ulFlags & LSF_LENSFLAREONLY )){ #line 2408 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (! (pls -> ls_ulFlags & LSF_DIRECTIONAL )); #line 2409 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box |= FLOATaabbox3D (FLOAT3D (0 , 0 , 0) , pls -> ls_rFallOff ); #line 2410 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }} #line 2412 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box . ExpandByFactor (phy_fCollisionCacheAround - 1.0f); #line 2414 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box += en_plPlacement . pl_PositionVector ; #line 2415 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate = box ; #line 2416 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box += en_vIntendedTranslation * phy_fCollisionCacheAhead ; #line 2417 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate |= box ; #line 2420 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation = FLOAT3D (0.0f , 0.0f , 0.0f); #line 2421 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mAppliedRotation . Diagonal (1.0f); #line 2422 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_PREMOVING ); #line 2424 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2428 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" void CMovableEntity::PreMovingOld(void) #line 2429 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 2430 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pciCollisionInfo == NULL ){ #line 2431 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 2432 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2438 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_PREMOVING ); #line 2439 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementTimerAveragingCounter (CPhysicsProfile :: PTI_PREMOVING ); #line 2442 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plLastPlacement = en_plPlacement ; #line 2445 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {FOREACHINLIST (CEntity , en_lnInParent , en_lhChildren , itenChild ){ #line 2447 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((itenChild -> en_ulPhysicsFlags & EPF_MOVABLE ) #line 2448 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && ! ((CMovableEntity *) & * itenChild ) -> en_lnInMovers . IsLinked ()){ #line 2449 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penChild = ((CMovableEntity *) & * itenChild ); #line 2451 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penChild -> en_plLastPlacement = penChild -> en_plPlacement ; #line 2452 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2453 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }} #line 2455 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fTickQuantum = _pTimer -> TickQuantum ; #line 2458 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(dbg_bBreak ){ #line 2459 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" dbg_bBreak = FALSE ; #line 2460 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" try { #line 2461 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" Breakpoint (); #line 2462 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }catch (ANYEXCEPTION ){ #line 2463 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CPrintF ("Breakpoint!\n"); #line 2464 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }; #line 2465 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2473 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT fMaxSpeed = 300.0f; #line 2474 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (1) = Clamp (en_vCurrentTranslationAbsolute (1) , - fMaxSpeed , + fMaxSpeed ); #line 2475 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (2) = Clamp (en_vCurrentTranslationAbsolute (2) , - fMaxSpeed , + fMaxSpeed ); #line 2476 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute (3) = Clamp (en_vCurrentTranslationAbsolute (3) , - fMaxSpeed , + fMaxSpeed ); #line 2479 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_RenderType == RT_MODEL || en_RenderType == RT_EDITORMODEL ){ #line 2481 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestFields (en_iUpContent , en_iDnContent , en_fImmersionFactor ); #line 2483 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_STICKYFEET ){ #line 2485 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vPoint ; #line 2486 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATplane3D plPlane ; #line 2487 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fDistanceToEdge ; #line 2488 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(GetNearestPolygon (vPoint , plPlane , fDistanceToEdge )){ #line 2489 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vGravityDir = - (FLOAT3D &) plPlane ; #line 2490 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2491 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2492 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2493 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CContentType & ctDn = en_pwoWorld -> wo_actContentTypes [ en_iDnContent ]; #line 2494 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CContentType & ctUp = en_pwoWorld -> wo_actContentTypes [ en_iUpContent ]; #line 2497 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestBreathing (ctUp ); #line 2499 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestContentDamage (ctDn , en_fImmersionFactor ); #line 2501 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL ){ #line 2502 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CSurfaceType & stReference = en_pwoWorld -> wo_astSurfaceTypes [ en_iReferenceSurface ]; #line 2503 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TestSurfaceDamage (stReference ); #line 2504 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2507 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fBouyancy = (1 - #line 2508 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ctDn . ct_fDensity / en_fDensity ) * en_fImmersionFactor - #line 2509 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (ctUp . ct_fDensity / en_fDensity ) * (1 - en_fImmersionFactor )); #line 2510 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fSpeedModifier = #line 2511 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctDn . ct_fSpeedMultiplier * en_fImmersionFactor + #line 2512 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctUp . ct_fSpeedMultiplier * (1 - en_fImmersionFactor ); #line 2513 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFluidFriction = #line 2514 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctDn . ct_fFluidFriction * en_fImmersionFactor + #line 2515 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctUp . ct_fFluidFriction * (1 - en_fImmersionFactor ); #line 2516 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fControlMultiplier = #line 2517 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctDn . ct_fControlMultiplier * en_fImmersionFactor + #line 2518 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ctUp . ct_fControlMultiplier * (1 - en_fImmersionFactor ); #line 2521 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vDesiredTranslationAbsolute = en_vDesiredTranslationRelative ; #line 2523 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! (en_ulPhysicsFlags & EPF_ABSOLUTETRANSLATE )){ #line 2524 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute *= en_mRotation ; #line 2525 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2527 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute *= fTickQuantum ; #line 2528 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ANGLE3D aRotationRelative ; #line 2529 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" aRotationRelative (1) = en_aDesiredRotationRelative (1) * fTickQuantum ; #line 2530 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" aRotationRelative (2) = en_aDesiredRotationRelative (2) * fTickQuantum ; #line 2531 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" aRotationRelative (3) = en_aDesiredRotationRelative (3) * fTickQuantum ; #line 2533 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D mRotationAbsolute ; #line 2535 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_PUSH ){ #line 2536 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D mNewRotation ; #line 2537 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" MakeRotationMatrixFast (mNewRotation , en_plPlacement . pl_OrientationAngle + aRotationRelative ); #line 2538 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = mNewRotation * ! en_mRotation ; #line 2540 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2541 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" MakeRotationMatrixFast (mRotationAbsolute , aRotationRelative ); #line 2542 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = en_mRotation * (mRotationAbsolute * ! en_mRotation ); #line 2543 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2546 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute *= fSpeedModifier ; #line 2549 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fJump = - en_mRotation . GetColumn (2) % vDesiredTranslationAbsolute ; #line 2551 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bReferenceMovingInY = FALSE ; #line 2552 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bReferenceRotatingNonY = FALSE ; #line 2554 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL && (en_penReference -> en_ulPhysicsFlags & EPF_MOVABLE )){ #line 2555 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penReference = (CMovableEntity *) (CEntity *) en_penReference ; #line 2557 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOAT3D & vReferenceTranslation = penReference -> en_vIntendedTranslation ; #line 2558 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" const FLOATmatrix3D & mReferenceRotation = penReference -> en_mIntendedRotation ; #line 2560 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vRadius = en_plPlacement . pl_PositionVector #line 2561 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" - penReference -> en_plPlacement . pl_PositionVector ; #line 2562 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vReferenceDelta = vReferenceTranslation + vRadius * mReferenceRotation - vRadius ; #line 2564 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute += vReferenceDelta ; #line 2565 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = mReferenceRotation * mRotationAbsolute ; #line 2568 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bReferenceMovingInY = (vReferenceDelta % en_vGravityDir != 0.0f); #line 2569 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bReferenceRotatingNonY = ((en_vGravityDir * mReferenceRotation ) % en_vGravityDir ) > 0.01f; #line 2570 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2572 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vTranslationAbsolute = en_vCurrentTranslationAbsolute * fTickQuantum ; #line 2575 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_ORIENTINGTOGRAVITY ; #line 2577 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_ORIENTEDBYGRAVITY ){ #line 2579 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vDown ; #line 2580 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDown (1) = - en_mRotation (1 , 2); #line 2581 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDown (2) = - en_mRotation (2 , 2); #line 2582 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDown (3) = - en_mRotation (3 , 2); #line 2585 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fCos = vDown % en_vGravityDir ; #line 2587 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fCos < 0.99999f){ #line 2589 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_ORIENTINGTOGRAVITY ; #line 2592 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ANGLE a = ACos (fCos ); #line 2593 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(Abs (a ) > 20){ #line 2594 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" a = 20 * Sgn (a ); #line 2595 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2596 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fRad = RadAngle (a ); #line 2599 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vAxis = vDown * en_vGravityDir ; #line 2600 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fLen = vAxis . Length (); #line 2601 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fLen < 0.01f){ #line 2602 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis (1) = en_mRotation (1 , 3); #line 2603 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis (2) = en_mRotation (2 , 3); #line 2604 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis (3) = en_mRotation (3 , 3); #line 2607 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(! bReferenceRotatingNonY ){ #line 2608 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" fRad /= fLen ; #line 2609 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2610 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vAxis *= fRad ; #line 2613 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATmatrix3D mGRotation ; #line 2614 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mGRotation (1 , 1) = 1;mGRotation (1 , 2) = - vAxis (3);mGRotation (1 , 3) = vAxis (2); #line 2615 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mGRotation (2 , 1) = vAxis (3);mGRotation (2 , 2) = 1;mGRotation (2 , 3) = - vAxis (1); #line 2616 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mGRotation (3 , 1) = - vAxis (2);mGRotation (3 , 2) = vAxis (1);mGRotation (3 , 3) = 1; #line 2617 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" OrthonormalizeRotationMatrix (mGRotation ); #line 2620 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" mRotationAbsolute = mGRotation * mRotationAbsolute ; #line 2621 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2622 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2625 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_FLOATING ; #line 2627 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT ACC = en_fAcceleration * fTickQuantum * fTickQuantum ; #line 2628 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT DEC = en_fDeceleration * fTickQuantum * fTickQuantum ; #line 2630 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! (en_ulPhysicsFlags & EPF_TRANSLATEDBYGRAVITY )){ #line 2632 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_NOACCELERATION ){ #line 2633 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute = vDesiredTranslationAbsolute ; #line 2634 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2635 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , vDesiredTranslationAbsolute , #line 2636 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fControlMultiplier , #line 2637 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fControlMultiplier ); #line 2638 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2640 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if((fBouyancy * en_fGravityA < 0.5f && (ctDn . ct_ulFlags & (CTF_SWIMABLE | CTF_FLYABLE )))){ #line 2642 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_FLOATING ; #line 2644 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_NOACCELERATION ){ #line 2645 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute = vDesiredTranslationAbsolute ; #line 2646 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2647 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , vDesiredTranslationAbsolute , #line 2648 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fControlMultiplier , #line 2649 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fControlMultiplier ); #line 2650 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2653 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fBouyancy < - 0.1f){ #line 2654 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2655 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * - fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2656 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , en_vGravityDir * - fGV , fGA , fGA ); #line 2657 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(fBouyancy > + 0.1f){ #line 2658 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2659 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2660 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , en_vGravityDir * fGV , fGA , fGA ); #line 2661 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2664 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2665 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bGravityAlongPolygon = TRUE ; #line 2667 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn == NULL || ! IsStandingOnPolygon (en_pbpoStandOn ) || bReferenceMovingInY #line 2668 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || (en_ulPhysicsFlags & EPF_ORIENTINGTOGRAVITY )){ #line 2670 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 2671 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference == NULL || bReferenceMovingInY ){ #line 2672 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" bGravityAlongPolygon = FALSE ; #line 2673 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2674 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2677 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! bGravityAlongPolygon ){ #line 2678 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_GRAVITY_NONTRIVIAL ); #line 2681 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2682 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2683 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddGAcceleration (vTranslationAbsolute , en_vGravityDir , fGA , fGV ); #line 2685 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2686 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_GRAVITY_TRIVIAL ); #line 2689 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vPolygonDir = - en_vReferencePlane ; #line 2691 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vGParallel , vGNormal ; #line 2692 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" GetParallelAndNormalComponents (en_vGravityDir , vPolygonDir , vGNormal , vGParallel ); #line 2694 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFactor = vGParallel . Length (); #line 2696 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fFactor > 0.001f){ #line 2697 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGV = en_fGravityV * fTickQuantum * fSpeedModifier ; #line 2698 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fGA = (en_fGravityA * fBouyancy ) * fTickQuantum * fTickQuantum ; #line 2699 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddGAcceleration (vTranslationAbsolute , vGParallel / fFactor , fGA * fFactor , fGV * fFactor ); #line 2700 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2703 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPolyGA = (vPolygonDir % en_vGravityDir ) * en_fGravityA ; #line 2704 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fYSpeed = vPolygonDir % vTranslationAbsolute ; #line 2705 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fYSpeed > 0 && fYSpeed < fPolyGA ){ #line 2706 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute -= vPolygonDir * fYSpeed ; #line 2707 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2710 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_BOUNCE ){ #line 2712 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative *= en_fJumpControlMultiplier ; #line 2713 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_aDesiredRotationRelative . Length () < 10){ #line 2714 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = ANGLE3D (0 , 0 , 0); #line 2715 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2716 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2717 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2719 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CSurfaceType & stReference = en_pwoWorld -> wo_astSurfaceTypes [ en_iReferenceSurface ]; #line 2722 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL ){ #line 2723 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPlaneY = (en_vGravityDir % en_vReferencePlane ); #line 2724 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fPlaneYAbs = Abs (fPlaneY ); #line 2725 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fFriction = stReference . st_fFriction ; #line 2727 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fPlaneY >= - stReference . st_fClimbSlopeCos && fPlaneY < 0 #line 2728 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || (stReference . st_ulFlags & STF_SLIDEDOWNSLOPE ) && fPlaneY > - 0.99f){ #line 2729 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags |= EPF_ONSTEEPSLOPE ; #line 2731 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAccelerationOnPlane2 ( #line 2732 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute , #line 2733 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute , #line 2734 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2735 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2736 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane , #line 2737 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vGravityDir ); #line 2739 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2740 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_ONSTEEPSLOPE ; #line 2742 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAccelerationOnPlane ( #line 2743 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute , #line 2744 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute , #line 2745 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2746 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fPlaneYAbs * fPlaneYAbs * fFriction * fControlMultiplier , #line 2747 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane ); #line 2748 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2750 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fJump < - 0.01f && (fPlaneY < - stReference . st_fJumpSlopeCos #line 2751 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || _pTimer -> CurrentTick () > en_tmLastSignificantVerticalMovement + 0.25f)){ #line 2753 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute += en_vGravityDir * fJump ; #line 2754 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmJumped = _pTimer -> CurrentTick (); #line 2755 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 2756 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2759 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2761 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_pTimer -> CurrentTick () - en_tmJumped < en_tmMaxJumpControl ){ #line 2763 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAccelerationOnPlane ( #line 2764 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute , #line 2765 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vDesiredTranslationAbsolute , #line 2766 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ACC * fControlMultiplier * en_fJumpControlMultiplier , #line 2767 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" DEC * fControlMultiplier * en_fJumpControlMultiplier , #line 2768 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATplane3D (en_vGravityDir , 0)); #line 2769 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2772 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fJump < - 0.01f && #line 2773 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pTimer -> CurrentTick () > en_tmLastSignificantVerticalMovement + 0.25f){ #line 2775 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" vTranslationAbsolute += en_vGravityDir * fJump ; #line 2776 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmJumped = _pTimer -> CurrentTick (); #line 2777 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pbpoStandOn = NULL ; #line 2778 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2779 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2780 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2784 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CheckAndAddGAcceleration (this , vTranslationAbsolute , fTickQuantum ); #line 2787 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fFluidFriction > 0.01f){ #line 2789 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" AddAcceleration (vTranslationAbsolute , FLOAT3D (0.0f , 0.0f , 0.0f) , #line 2790 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" 0.0f , DEC * fFluidFriction ); #line 2791 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2794 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_CANFADESPINNING ) && #line 2795 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ((ctDn . ct_ulFlags & CTF_FADESPINNING ) || (ctUp . ct_ulFlags & CTF_FADESPINNING ))){ #line 2797 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative *= (1 - fSpeedModifier * 0.05f); #line 2798 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_aDesiredRotationRelative . Length () < 10){ #line 2799 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_aDesiredRotationRelative = ANGLE3D (0 , 0 , 0); #line 2800 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2801 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2804 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pbpoStandOn == NULL ){ #line 2805 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_penReference = NULL ; #line 2806 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vReferencePlane = FLOAT3D (0.0f , 0.0f , 0.0f); #line 2807 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_iReferenceSurface = 0; #line 2808 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2810 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vIntendedTranslation = vTranslationAbsolute ; #line 2811 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mIntendedRotation = mRotationAbsolute ; #line 2816 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOATaabbox3D box ; #line 2817 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_pciCollisionInfo -> MakeBoxAtPlacement (FLOAT3D (0 , 0 , 0) , en_mRotation , box ); #line 2819 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" {CLightSource * pls = GetLightSource (); #line 2820 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(pls != NULL && ! (pls -> ls_ulFlags & LSF_LENSFLAREONLY )){ #line 2822 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT (! (pls -> ls_ulFlags & LSF_DIRECTIONAL )); #line 2823 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box |= FLOATaabbox3D (FLOAT3D (0 , 0 , 0) , pls -> ls_rFallOff ); #line 2824 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }} #line 2826 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box . ExpandByFactor (phy_fCollisionCacheAround - 1.0f); #line 2828 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box += en_plPlacement . pl_PositionVector ; #line 2829 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate = box ; #line 2830 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" box += en_vIntendedTranslation * phy_fCollisionCacheAhead ; #line 2831 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_boxMovingEstimate |= box ; #line 2834 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vAppliedTranslation = FLOAT3D (0.0f , 0.0f , 0.0f); #line 2835 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mAppliedRotation . Diagonal (1.0f); #line 2836 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_PREMOVING ); #line 2838 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::DoMoving(void) #line 2842 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 2843 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pciCollisionInfo == NULL || (en_ulPhysicsFlags & EPF_FORCEADDED )){ #line 2844 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 2845 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2848 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_DOMOVING ); #line 2849 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementTimerAveragingCounter (CPhysicsProfile :: PTI_DOMOVING ); #line 2851 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_DOMOVING ); #line 2853 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fTickQuantum = _pTimer -> TickQuantum ; #line 2856 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_RT_SYNCHRONIZED ){ #line 2857 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_DOMOVING_SYNC ); #line 2860 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vMoveTranslation = en_vIntendedTranslation - en_vAppliedTranslation ; #line 2861 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mMoveRotation = en_mIntendedRotation * ! en_mAppliedRotation ; #line 2863 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InitTryToMove (); #line 2864 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penPusher = NULL ; #line 2865 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) == EPF_ONBLOCK_PUSH ){ #line 2866 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penPusher = this ; #line 2867 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2868 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bMoveSuccessfull = TryToMove (penPusher , TRUE , TRUE ); #line 2871 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2872 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ASSERT ((en_ulPhysicsFlags & EPF_ONBLOCK_MASK ) != EPF_ONBLOCK_PUSH ); #line 2873 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_DOMOVING_ASYNC ); #line 2876 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference == NULL ){ #line 2877 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_DOMOVING_ASYNC_SYNCTRY ); #line 2880 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vMoveTranslation = en_vIntendedTranslation - en_vAppliedTranslation ; #line 2881 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mMoveRotation = en_mIntendedRotation * ! en_mAppliedRotation ; #line 2882 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InitTryToMove (); #line 2883 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _ctTryToMoveCheckCounter = 4; #line 2884 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" BOOL bMoveSuccessfull = TryToMove (NULL , TRUE , TRUE ); #line 2886 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(bMoveSuccessfull ){ #line 2888 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_DOMOVING_ASYNC_SYNCPASS ); #line 2889 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_DOMOVING ); #line 2891 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 2892 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2893 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2895 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_DOMOVING_ASYNC_TRANSLATE ); #line 2897 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vMoveTranslation = en_vIntendedTranslation - en_vAppliedTranslation ; #line 2898 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InitTryToMove (); #line 2899 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TryToMove (NULL , TRUE , FALSE ); #line 2902 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mMoveRotation = en_mIntendedRotation * ! en_mAppliedRotation ; #line 2903 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if( #line 2904 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mMoveRotation (1 , 1) != 1 || en_mMoveRotation (1 , 2) != 0 || en_mMoveRotation (1 , 3) != 0 || #line 2905 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mMoveRotation (2 , 1) != 0 || en_mMoveRotation (2 , 2) != 1 || en_mMoveRotation (2 , 3) != 0 || #line 2906 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_mMoveRotation (3 , 1) != 0 || en_mMoveRotation (3 , 2) != 0 || en_mMoveRotation (3 , 3) != 1){ #line 2907 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementCounter (CPhysicsProfile :: PCI_DOMOVING_ASYNC_ROTATE ); #line 2908 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InitTryToMove (); #line 2909 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TryToMove (NULL , FALSE , TRUE ); #line 2910 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2911 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2913 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_DOMOVING ); #line 2915 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::PostMoving(void) #line 2919 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 2920 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_pciCollisionInfo == NULL ){ #line 2922 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulFlags |= ENF_INRENDERING ; #line 2923 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 2924 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2926 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulPhysicsFlags & EPF_FORCEADDED ){ #line 2927 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_FORCEADDED ; #line 2928 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return ; #line 2929 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2933 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StartTimer (CPhysicsProfile :: PTI_POSTMOVING ); #line 2934 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . IncrementTimerAveragingCounter (CPhysicsProfile :: PTI_POSTMOVING ); #line 2937 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL ){ #line 2938 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_penLastValidReference = en_penReference ; #line 2939 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2942 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vOldTranslation = en_vCurrentTranslationAbsolute ; #line 2943 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fTickQuantum = _pTimer -> TickQuantum ; #line 2945 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vCurrentTranslationAbsolute = en_vAppliedTranslation / fTickQuantum ; #line 2948 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(Abs (en_vCurrentTranslationAbsolute % en_vGravityDir ) > 0.1f){ #line 2949 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_tmLastSignificantVerticalMovement = _pTimer -> CurrentTick (); #line 2950 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2952 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ClearNextPosition (); #line 2955 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT3D vSpeedDelta = en_vIntendedTranslation - en_vAppliedTranslation ; #line 2956 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fSpeedDelta = vSpeedDelta . Length () / fTickQuantum ; #line 2959 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(fSpeedDelta > en_fCollisionSpeedLimit && #line 2960 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" ! (en_ulPhysicsFlags & EPF_NOIMPACTTHISTICK )){ #line 2962 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" FLOAT fDamage = ((fSpeedDelta - en_fCollisionSpeedLimit ) / en_fCollisionSpeedLimit ) * en_fCollisionDamageFactor ; #line 2963 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" InflictDirectDamage (this , MiscDamageInflictor () , DMT_IMPACT , fDamage , #line 2964 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plPlacement . pl_PositionVector , - vSpeedDelta . Normalize ()); #line 2965 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2966 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulPhysicsFlags &= ~ EPF_NOIMPACTTHISTICK ; #line 2969 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_vIntendedTranslation = vOldTranslation ; #line 2972 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_vCurrentTranslationAbsolute . ManhattanNorm () < 0.001f #line 2973 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && (en_vDesiredTranslationRelative . ManhattanNorm () == 0 || en_fAcceleration == 0) #line 2974 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" && en_aDesiredRotationRelative . ManhattanNorm () == 0){ #line 2977 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference != NULL ){ #line 2979 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_penReference -> en_ulPhysicsFlags & EPF_MOVABLE ){ #line 2980 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penReference = (CMovableEntity *) (CEntity *) en_penReference ; #line 2982 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(! penReference -> en_lnInMovers . IsLinked ()){ #line 2984 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulFlags |= ENF_INRENDERING ; #line 2985 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2987 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2989 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulFlags |= ENF_INRENDERING ; #line 2990 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 2993 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else { #line 2995 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if( #line 2996 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" (! (en_ulPhysicsFlags & (EPF_TRANSLATEDBYGRAVITY | EPF_ORIENTEDBYGRAVITY )) #line 2997 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" || en_fGravityA == 0.0f)){ #line 2999 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_ulFlags |= ENF_INRENDERING ; #line 3000 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3001 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3004 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_ulFlags & ENF_INRENDERING ){ #line 3006 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plLastPlacement = en_plPlacement ; #line 3007 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3008 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3011 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(en_plpLastPositions != NULL ){ #line 3012 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plpLastPositions -> AddPosition (en_vNextPosition ); #line 3013 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3017 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" extern BOOL _bPredictionActive ; #line 3018 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(_bPredictionActive && (IsPredictable () || IsPredictor ())){ #line 3019 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CMovableEntity * penTail = (CMovableEntity *) GetPredictedSafe (this ); #line 3020 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" TIME tmNow = _pTimer -> CurrentTick (); #line 3022 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penTail -> en_tmLastPredictionHead < - 1){ #line 3023 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vLastHead = en_plPlacement . pl_PositionVector ; #line 3024 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredError = FLOAT3D (0 , 0 , 0); #line 3025 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredErrorLast = FLOAT3D (0 , 0 , 0); #line 3026 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3029 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsPredictor ()){ #line 3031 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penTail -> en_tmLastPredictionHead == tmNow || penTail -> en_tmLastPredictionHead < 0){ #line 3033 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredErrorLast = penTail -> en_vPredError ; #line 3034 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredError += #line 3035 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plPlacement . pl_PositionVector - penTail -> en_vLastHead ; #line 3037 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vLastHead = en_plPlacement . pl_PositionVector ; #line 3039 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsPredictionHead ()){ #line 3041 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_tmLastPredictionHead = tmNow ; #line 3042 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3045 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(tmNow > penTail -> en_tmLastPredictionHead ){ #line 3047 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vLastHead = en_plPlacement . pl_PositionVector ; #line 3048 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_tmLastPredictionHead = tmNow ; #line 3049 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3052 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" }else if(! (en_ulFlags & ENF_WILLBEPREDICTED )){ #line 3054 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(penTail -> en_tmLastPredictionHead > 0){ #line 3056 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredErrorLast = penTail -> en_vPredError ; #line 3057 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredError += #line 3058 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" en_plPlacement . pl_PositionVector - penTail -> en_vLastHead ; #line 3059 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3061 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vLastHead = en_plPlacement . pl_PositionVector ; #line 3062 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_tmLastPredictionHead = - 1; #line 3063 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3065 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" if(IsPredictionHead ()){ #line 3067 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredErrorLast = penTail -> en_vPredError ; #line 3068 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" penTail -> en_vPredError *= cli_fPredictionFilter ; #line 3073 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3074 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3077 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" _pfPhysicsProfile . StopTimer (CPhysicsProfile :: PTI_POSTMOVING ); #line 3080 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } void CMovableEntity::CacheNearPolygons(void) #line 3084 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 3085 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" CClipMove cm (this ); #line 3086 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" cm . CacheNearPolygons (); #line 3087 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } #line 3091 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SLONG CMovableEntity::GetUsedMemory(void) #line 3092 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" { #line 3094 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" SLONG slUsedMemory = sizeof (CMovableEntity ) - sizeof (CRationalEntity ) + CRationalEntity :: GetUsedMemory (); #line 3096 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" slUsedMemory += en_apbpoNearPolygons . sa_Count * sizeof (CBrushPolygon *); #line 3097 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" return slUsedMemory ; #line 3098 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" } BOOL CMovableEntity:: #line 3105 "D:/SE1_GPL/Sources/Engine/Classes/MovableEntity.es" Dummy(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CMovableEntity_Dummy ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMovableEntity::Dummy expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; ASSERT(FALSE); return TRUE;};