From f500f9c3c0bf1db998b220fd7e921a8b22ae1979 Mon Sep 17 00:00:00 2001 From: vedran77 Date: Sat, 6 Jan 2024 04:17:02 +0100 Subject: [PATCH 1/2] Change gravity type to float --- Server/Source/player_impl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/Source/player_impl.hpp b/Server/Source/player_impl.hpp index c90921d04..0d45965f8 100644 --- a/Server/Source/player_impl.hpp +++ b/Server/Source/player_impl.hpp @@ -111,7 +111,7 @@ struct Player final : public IPlayer, public PoolIDProvider, public NoCopy bool toSpawn_; TimePoint lastGameTimeUpdate_; PlayerSpectateData spectateData_; - int gravity_; + float gravity_; bool ghostMode_; int defaultObjectsRemoved_; bool allowWeapons_; @@ -194,7 +194,7 @@ struct Player final : public IPlayer, public PoolIDProvider, public NoCopy toSpawn_ = false; lastGameTimeUpdate_ = TimePoint(); spectateData_ = { false, INVALID_PLAYER_ID, PlayerSpectateData::ESpectateType::None }; - gravity_ = 0; + gravity_ = 0.008f; ghostMode_ = false; defaultObjectsRemoved_ = 0; primarySyncUpdateType_ = PrimarySyncUpdateType::None; @@ -249,7 +249,7 @@ struct Player final : public IPlayer, public PoolIDProvider, public NoCopy , toSpawn_(false) , lastGameTimeUpdate_() , spectateData_({ false, INVALID_PLAYER_ID, PlayerSpectateData::ESpectateType::None }) - , gravity_(0) + , gravity_(0.008f) , ghostMode_(false) , defaultObjectsRemoved_(0) , allowWeapons_(true) From 5c8b5e8784c3cfef0dcdea230fb749b9768843db Mon Sep 17 00:00:00 2001 From: vedran77 Date: Sat, 6 Jan 2024 11:25:21 +0100 Subject: [PATCH 2/2] change gravity reset value --- Server/Source/player_impl.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/Source/player_impl.hpp b/Server/Source/player_impl.hpp index 0d45965f8..211d4bca7 100644 --- a/Server/Source/player_impl.hpp +++ b/Server/Source/player_impl.hpp @@ -194,7 +194,7 @@ struct Player final : public IPlayer, public PoolIDProvider, public NoCopy toSpawn_ = false; lastGameTimeUpdate_ = TimePoint(); spectateData_ = { false, INVALID_PLAYER_ID, PlayerSpectateData::ESpectateType::None }; - gravity_ = 0.008f; + gravity_ = 0.0f; ghostMode_ = false; defaultObjectsRemoved_ = 0; primarySyncUpdateType_ = PrimarySyncUpdateType::None; @@ -249,7 +249,7 @@ struct Player final : public IPlayer, public PoolIDProvider, public NoCopy , toSpawn_(false) , lastGameTimeUpdate_() , spectateData_({ false, INVALID_PLAYER_ID, PlayerSpectateData::ESpectateType::None }) - , gravity_(0.008f) + , gravity_(0.0f) , ghostMode_(false) , defaultObjectsRemoved_(0) , allowWeapons_(true)