summaryrefslogtreecommitdiffstats
path: root/src/entities/Physical.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-09 22:39:29 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-09 22:39:29 +0200
commitca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1 (patch)
tree22019f7aa3ed57061c581ae837b6f4f3751d3822 /src/entities/Physical.h
parentRunningScript: 1/12 (diff)
parentyet more CAutomobile (diff)
downloadre3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.gz
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.bz2
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.lz
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.xz
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.tar.zst
re3-ca4c7d9a4b802940eee9bf0cf86c30120d2e5ca1.zip
Diffstat (limited to 'src/entities/Physical.h')
-rw-r--r--src/entities/Physical.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/entities/Physical.h b/src/entities/Physical.h
index c1f9f1d9..5bd98815 100644
--- a/src/entities/Physical.h
+++ b/src/entities/Physical.h
@@ -8,6 +8,8 @@ enum {
PHYSICAL_MAX_COLLISIONRECORDS = 6
};
+#define GRAVITY (0.008f)
+
class CTreadable;
class CPhysical : public CEntity
@@ -59,7 +61,7 @@ public:
uint8 bHitByTrain : 1; // from nick
uint8 m_phy_flagA80 : 1;
- uint8 m_nLastCollType;
+ uint8 m_nSurfaceTouched;
uint8 m_nZoneLevel;
CPhysical(void);
@@ -73,7 +75,7 @@ public:
void ProcessShift(void);
void ProcessCollision(void);
- virtual int32 ProcessEntityCollision(CEntity *ent, CColPoint *point);
+ virtual int32 ProcessEntityCollision(CEntity *ent, CColPoint *colpoints);
void RemoveAndAdd(void);
void AddToMovingList(void);
@@ -108,7 +110,23 @@ public:
}
const CVector &GetMoveSpeed() { return m_vecMoveSpeed; }
+ void SetMoveSpeed(float x, float y, float z) {
+ m_vecMoveSpeed.x = x;
+ m_vecMoveSpeed.y = y;
+ m_vecMoveSpeed.z = z;
+ }
const CVector &GetTurnSpeed() { return m_vecTurnSpeed; }
+ void SetTurnSpeed(float x, float y, float z) {
+ m_vecTurnSpeed.x = x;
+ m_vecTurnSpeed.y = y;
+ m_vecTurnSpeed.z = z;
+ }
+ const CVector &GetCenterOfMass() { return m_vecCentreOfMass; }
+ void SetCenterOfMass(float x, float y, float z) {
+ m_vecCentreOfMass.x = x;
+ m_vecCentreOfMass.y = y;
+ m_vecCentreOfMass.z = z;
+ }
void ApplyMoveSpeed(void);
void ApplyTurnSpeed(void);