From 59e38d1a46101252e684e9514bdb912e3e030fec Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Thu, 2 Apr 2020 08:29:42 +0100 Subject: Fix explosion knockback issues and tweak knockback strength (#4590) --- src/Entities/Player.cpp | 2 +- src/Entities/Player.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 8876566da..b5d7f7c83 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -3080,7 +3080,7 @@ float cPlayer::GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_Ex return 0; // No impact from explosion } - return super::GetExplosionExposureRate(a_ExplosionPosition, a_ExlosionPower); + return super::GetExplosionExposureRate(a_ExplosionPosition, a_ExlosionPower) / 30.0f; } diff --git a/src/Entities/Player.h b/src/Entities/Player.h index bea6e98f6..fafdd04eb 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -581,6 +581,9 @@ public: Otherwise it returns the dig speed (float GetDigSpeed(BLOCKTYPE a_Block)) divided by the block hardness (cBlockInfo::GetHardness(BLOCKTYPE a_Block)) divided by 30 if the player can harvest the block and divided by 100 if he can't. */ float GetPlayerRelativeBlockHardness(BLOCKTYPE a_Block); + /** get player explosion exposure rate */ + virtual float GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_ExlosionPower) override; + protected: typedef std::vector > AStringVectorVector; @@ -759,9 +762,6 @@ protected: /** Returns the filename for the player data based on the UUID given. This can be used both for online and offline UUIDs. */ AString GetUUIDFileName(const cUUID & a_UUID); - - /** get player explosion exposure rate */ - virtual float GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_ExlosionPower) override; private: /** Pins the player to a_Location until Unfreeze() is called. -- cgit v1.2.3