From a61da7404bf8430132864d493c7e75a6b4c3d978 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 8 Mar 2014 22:36:35 +0100 Subject: Added fall damage + changed window title --- src/physics/physics.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/physics/physics.h') diff --git a/src/physics/physics.h b/src/physics/physics.h index 834d7b8..cf15b13 100644 --- a/src/physics/physics.h +++ b/src/physics/physics.h @@ -248,5 +248,8 @@ protected: bool m_bSoundSlow; bool m_bForceUpdate; bool m_bLowLevel; + float m_fallingHeight; + float m_fallDamageFraction; + float m_minFallingHeight; }; -- cgit v1.2.3-1-g7c22 From 2ee0702d69728016593030e1b3a18d537563dab4 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 9 Mar 2014 14:36:39 +0100 Subject: Made some improvements to fall damage from a61da740 Fall damage on: - no energy - overheat Fall damage off: - underwater --- src/physics/physics.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/physics/physics.h') diff --git a/src/physics/physics.h b/src/physics/physics.h index cf15b13..fea5601 100644 --- a/src/physics/physics.h +++ b/src/physics/physics.h @@ -165,6 +165,14 @@ public: void CreateInterface(bool bSelect); Error GetError(); + float GetFallingHeight(); + + void SetMinFallingHeight(float value); + float GetMinFallingHeight(); + + void SetFallDamageFraction(float value); + float GetFallDamageFraction(); + protected: bool EventFrame(const Event &event); void WaterFrame(float aTime, float rTime); @@ -191,6 +199,7 @@ protected: void MotorParticle(float aTime, float rTime); void WaterParticle(float aTime, Math::Vector pos, ObjectType type, float floor, float advance, float turn); void WheelParticle(int color, float width); + void SetFalling(); protected: Gfx::CEngine* m_engine; @@ -240,16 +249,16 @@ protected: float m_restBreakParticle; float m_floorLevel; // ground level float m_floorHeight; // height above the ground - int m_soundChannel; - int m_soundChannelSlide; + int m_soundChannel; + int m_soundChannelSlide; float m_soundTimePshhh; float m_soundTimeJostle; float m_soundTimeBoum; bool m_bSoundSlow; bool m_bForceUpdate; bool m_bLowLevel; - float m_fallingHeight; - float m_fallDamageFraction; - float m_minFallingHeight; + float m_fallingHeight; + float m_fallDamageFraction; + float m_minFallingHeight; }; -- cgit v1.2.3-1-g7c22