/*
 * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
 */

#ifndef _Engine_Classes_MovableEntity_INCLUDED
#define _Engine_Classes_MovableEntity_INCLUDED 1
#define EVENTCODE_EInternal 0x00010000
class DECL_DLL EInternal : public CEntityEvent {
public:
EInternal();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(EInternal &e) { e = EInternal(); } ;
#define EVENTCODE_EVoid 0x00010001
class DECL_DLL EVoid : public CEntityEvent {
public:
EVoid();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(EVoid &e) { e = EVoid(); } ;
#define EVENTCODE_EReturn 0x00010002
class DECL_DLL EReturn : public CEntityEvent {
public:
EReturn();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(EReturn &e) { e = EReturn(); } ;
#define EVENTCODE_EBegin 0x00010003
class DECL_DLL EBegin : public CEntityEvent {
public:
EBegin();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(EBegin &e) { e = EBegin(); } ;
#define EVENTCODE_ETimer 0x00010004
class DECL_DLL ETimer : public CEntityEvent {
public:
ETimer();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(ETimer &e) { e = ETimer(); } ;
#define EVENTCODE_ETouch 0x00010005
class DECL_DLL ETouch : public CEntityEvent {
public:
ETouch();
CEntityEvent *MakeCopy(void);
CEntityPointer penOther;
BOOL bThisMoved;
FLOATplane3D plCollision;
};
DECL_DLL inline void ClearToDefault(ETouch &e) { e = ETouch(); } ;
#define EVENTCODE_EPass 0x00010006
class DECL_DLL EPass : public CEntityEvent {
public:
EPass();
CEntityEvent *MakeCopy(void);
CEntityPointer penOther;
BOOL bThisMoved;
};
DECL_DLL inline void ClearToDefault(EPass &e) { e = EPass(); } ;
#define EVENTCODE_EBlock 0x00010007
class DECL_DLL EBlock : public CEntityEvent {
public:
EBlock();
CEntityEvent *MakeCopy(void);
CEntityPointer penOther;
FLOATplane3D plCollision;
};
DECL_DLL inline void ClearToDefault(EBlock &e) { e = EBlock(); } ;
#define EVENTCODE_EWouldFall 0x00010008
class DECL_DLL EWouldFall : public CEntityEvent {
public:
EWouldFall();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(EWouldFall &e) { e = EWouldFall(); } ;
#define EVENTCODE_ETeleport 0x00010009
class DECL_DLL ETeleport : public CEntityEvent {
public:
ETeleport();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(ETeleport &e) { e = ETeleport(); } ;
#define EVENTCODE_EPreLevelChange 0x0001000a
class DECL_DLL EPreLevelChange : public CEntityEvent {
public:
EPreLevelChange();
CEntityEvent *MakeCopy(void);
INDEX iUserData;
};
DECL_DLL inline void ClearToDefault(EPreLevelChange &e) { e = EPreLevelChange(); } ;
#define EVENTCODE_EPostLevelChange 0x0001000b
class DECL_DLL EPostLevelChange : public CEntityEvent {
public:
EPostLevelChange();
CEntityEvent *MakeCopy(void);
INDEX iUserData;
};
DECL_DLL inline void ClearToDefault(EPostLevelChange &e) { e = EPostLevelChange(); } ;
#define EVENTCODE_EFirstWorldBase 0x0001000c
class DECL_DLL EFirstWorldBase : public CEntityEvent {
public:
EFirstWorldBase();
CEntityEvent *MakeCopy(void);
};
DECL_DLL inline void ClearToDefault(EFirstWorldBase &e) { e = EFirstWorldBase(); } ;
extern DECL_DLL CEntityPropertyEnumType DamageType_enum;
enum DamageType {
  DMT_EXPLOSION = 1,
  DMT_PROJECTILE = 2,
  DMT_CLOSERANGE = 3,
  DMT_BULLET = 4,
  DMT_DROWNING = 5,
  DMT_IMPACT = 6,
  DMT_BRUSH = 7,
  DMT_BURNING = 8,
  DMT_ACID = 9,
  DMT_TELEPORT = 10,
  DMT_FREEZING = 11,
  DMT_CANNONBALL = 12,
  DMT_CANNONBALL_EXPLOSION = 13,
  DMT_SPIKESTAB = 14,
  DMT_ABYSS = 15,
  DMT_HEAT = 16,
  DMT_DAMAGER = 17,
  DMT_CHAINSAW = 18,
  DMT_NONE = 9999,
};
DECL_DLL inline void ClearToDefault(DamageType &e) { e = (DamageType)0; } ;
#define EVENTCODE_EDamage 0x0001000d
class DECL_DLL EDamage : public CEntityEvent {
public:
EDamage();
CEntityEvent *MakeCopy(void);
CEntityPointer penInflictor;
FLOAT3D vDirection;
FLOAT3D vHitPoint;
FLOAT fAmount;
enum DamageType dmtType;
};
DECL_DLL inline void ClearToDefault(EDamage &e) { e = EDamage(); } ;
#define EVENTCODE_EDeath 0x0001000e
class DECL_DLL EDeath : public CEntityEvent {
public:
EDeath();
CEntityEvent *MakeCopy(void);
EDamage eLastDamage;
};
DECL_DLL inline void ClearToDefault(EDeath &e) { e = EDeath(); } ;
#define EVENTCODE_ETakingBreath 0x0001000f
class DECL_DLL ETakingBreath : public CEntityEvent {
public:
ETakingBreath();
CEntityEvent *MakeCopy(void);
FLOAT fBreathDelay;
};
DECL_DLL inline void ClearToDefault(ETakingBreath &e) { e = ETakingBreath(); } ;
extern "C" DECL_DLL CDLLEntityClass CMovableEntity_DLLClass;
class DECL_DLL  CMovableEntity : public CRationalEntity {
public:
   virtual void SetDefaultProperties(void);
  FLOAT3D en_vDesiredTranslationRelative;
  ANGLE3D en_aDesiredRotationRelative;
  FLOAT3D en_vCurrentTranslationAbsolute;
  ANGLE3D en_aCurrentRotationAbsolute;
  CEntityPointer en_penReference;
  FLOAT3D en_vReferencePlane;
  INDEX en_iReferenceSurface;
  CEntityPointer en_penLastValidReference;
  FLOAT en_tmLastSignificantVerticalMovement;
  FLOAT en_tmLastBreathed;
  FLOAT en_tmMaxHoldBreath;
  FLOAT en_fDensity;
  FLOAT en_tmLastSwimDamage;
  INDEX en_iUpContent;
  INDEX en_iDnContent;
  FLOAT en_fImmersionFactor;
  FLOAT3D en_vGravityDir;
  FLOAT en_fGravityA;
  FLOAT en_fGravityV;
  FLOAT3D en_vForceDir;
  FLOAT en_fForceA;
  FLOAT en_fForceV;
  FLOAT en_tmJumped;
  FLOAT en_tmMaxJumpControl;
  FLOAT en_fJumpControlMultiplier;
  FLOAT en_fAcceleration;
  FLOAT en_fDeceleration;
  FLOAT en_fStepUpHeight;
  FLOAT en_fStepDnHeight;
  FLOAT en_fBounceDampParallel;
  FLOAT en_fBounceDampNormal;
  FLOAT en_fCollisionSpeedLimit;
  FLOAT en_fCollisionDamageFactor;
  FLOATaabbox3D en_boxMovingEstimate;
  FLOATaabbox3D en_boxNearCached;
  FLOAT3D en_vIntendedTranslation;
  FLOATmatrix3D en_mIntendedRotation;
CPlacement3D en_plLastPlacement;
CListNode en_lnInMovers;
CBrushPolygon * en_pbpoStandOn;
CStaticStackArray < CBrushPolygon * > en_apbpoNearPolygons;
FLOAT en_tmLastPredictionHead;
FLOAT3D en_vLastHead;
FLOAT3D en_vPredError;
FLOAT3D en_vPredErrorLast;
FLOAT3D en_vNextPosition;
FLOATmatrix3D en_mNextRotation;
FLOAT3D en_vMoveTranslation;
FLOATmatrix3D en_mMoveRotation;
FLOAT3D en_vAppliedTranslation;
FLOATmatrix3D en_mAppliedRotation;
   
#line 385 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void ResetPredictionFilter(void);
    CMovableEntity(void);
     ~ CMovableEntity(void);
   void OnInitialize(const CEntityEvent & eeInput);
   void OnEnd(void);
   void Copy(CEntity & enOther,ULONG ulFlags);
   
#line 457 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void ClearTemporaryData(void);
   void ChecksumForSync(ULONG & ulCRC,INDEX iExtensiveSyncCheck);
   void DumpSync_t(CTStream & strm,INDEX iExtensiveSyncCheck);
   void Read_t(CTStream * istr);
   void Write_t(CTStream * ostr);
   CPlacement3D GetLerpedPlacement(void)const;
   void AddToMovers(void);
   void AddToMoversDuringMoving(void);
   void SetDesiredRotation(const ANGLE3D & aRotation);
   const ANGLE3D & GetDesiredRotation(void)const;
   void SetDesiredTranslation(const FLOAT3D & vTranslation);
   const FLOAT3D & GetDesiredTranslation(void)const;
   void GiveImpulseTranslationRelative(const FLOAT3D & vImpulseSpeedRelative);
   void GiveImpulseTranslationAbsolute(const FLOAT3D & vImpulseSpeed);
   void LaunchAsPropelledProjectile(const FLOAT3D & vImpulseSpeedRelative,
#line 708 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
CMovableEntity * penLauncher);
   void LaunchAsFreeProjectile(const FLOAT3D & vImpulseSpeedRelative,
#line 716 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
CMovableEntity * penLauncher);
   void ForceStopTranslation(void);
   void ForceStopRotation(void);
   void ForceFullStop(void);
   void FakeJump(const FLOAT3D & vOrgSpeed,const FLOAT3D & vDirection,FLOAT fStrength,
#line 746 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
FLOAT fParallelMultiplier,FLOAT fNormalMultiplier,FLOAT fMaxExitSpeed,TIME tmControl);
   ANGLE GetRelativeHeading(const FLOAT3D & vDirection);
   ANGLE GetRelativePitch(const FLOAT3D & vDirection);
   void GetReferenceHeadingDirection(const FLOAT3D & vReference,ANGLE aH,FLOAT3D & vDirection);
   void GetHeadingDirection(ANGLE aH,FLOAT3D & vDirection);
   void GetPitchDirection(ANGLE aH,FLOAT3D & vDirection);
   
#line 847 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
CEntity * MiscDamageInflictor(void);
   
#line 864 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void UpdateOneSectorForce(CBrushSector & bsc,FLOAT fRatio);
   
#line 913 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void TestFields(INDEX & iUpContent,INDEX & iDnContent,FLOAT & fImmersionFactor);
   
#line 1065 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void TestBreathing(CContentType & ctUp);
   
#line 1101 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void TestContentDamage(CContentType & ctDn,FLOAT fImmersion);
   
#line 1134 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void TestSurfaceDamage(CSurfaceType & stDn);
   
#line 1160 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void SendTouchEvent(const CClipMove & cmMove);
   
#line 1175 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void SendBlockEvent(CClipMove & cmMove);
   
#line 1183 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL IsStandingOnPolygon(CBrushPolygon * pbpo);
   
#line 1246 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL IsPolygonBelowPoint(CBrushPolygon * pbpo,const FLOAT3D & vPoint,FLOAT fMaxDist);
  virtual BOOL AllowForGroundPolygon(CBrushPolygon * pbpo);
   
#line 1336 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL IsSomeNearPolygonBelowPoint(const FLOAT3D & vPoint,FLOAT fMaxDist);
   
#line 1343 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL IsSomeSectorPolygonBelowPoint(CBrushSector * pbsc,const FLOAT3D & vPoint,FLOAT fMaxDist);
   
#line 1359 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL WouldFallInNextPosition(void);
   
#line 1461 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void ClearNextPosition(void);
   
#line 1467 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
void SetPlacementFromNextPosition(void);
   
#line 1494 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL TryToGoUpstairs(const FLOAT3D & vTranslationAbsolute,const CSurfaceType & stHit,
#line 1495 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL bHitStairsOrg);
   
#line 1648 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
BOOL TryToMove(CMovableEntity * penPusher,BOOL bTranslate,BOOL bRotate);
   void ClearMovingTemp(void);
   void PreMoving(void);
   void DoMoving(void);
   void PostMoving(void);
   void CacheNearPolygons(void);
#define  STATE_CMovableEntity_Dummy 0x00010010
  BOOL 
#line 2719 "D:/WORK/Sources/Engine/Classes/MovableEntity.es"
Dummy(const CEntityEvent &__eeInput);
};
#endif // _Engine_Classes_MovableEntity_INCLUDED
