Fix initialization of variables hardcoded, due hp_max/breath_max

* related to https://codeberg.org/minenux/minetest-engine-minetest/issues/33
* this is becouse previously code was refactored
  in commit 76be103a91d6987527af19e87d93007be8ba8a67
This commit is contained in:
mckaygerhard 2023-07-21 23:36:51 -04:00
parent 63556217b3
commit a91668bbf6
2 changed files with 3 additions and 3 deletions

View File

@ -779,7 +779,7 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, u16 peer_id
m_wield_index(0), m_wield_index(0),
m_position_not_sent(false), m_position_not_sent(false),
m_is_singleplayer(is_singleplayer), m_is_singleplayer(is_singleplayer),
m_breath(PLAYER_MAX_BREATH), m_breath(PLAYER_MAX_BREATH_DEFAULT),
m_pitch(0), m_pitch(0),
m_fov(0), m_fov(0),
m_wanted_range(0), m_wanted_range(0),

View File

@ -35,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
LocalPlayer::LocalPlayer(Client *client, const char *name): LocalPlayer::LocalPlayer(Client *client, const char *name):
Player(name, client->idef()), Player(name, client->idef()),
parent(NULL), parent(NULL),
hp(PLAYER_MAX_HP), hp(PLAYER_MAX_HP_DEFAULT),
isAttached(false), isAttached(false),
touching_ground(false), touching_ground(false),
in_liquid(false), in_liquid(false),
@ -76,7 +76,7 @@ LocalPlayer::LocalPlayer(Client *client, const char *name):
m_old_node_below(32767,32767,32767), m_old_node_below(32767,32767,32767),
m_old_node_below_type("air"), m_old_node_below_type("air"),
m_can_jump(false), m_can_jump(false),
m_breath(PLAYER_MAX_BREATH), m_breath(PLAYER_MAX_BREATH_DEFAULT),
m_yaw(0), m_yaw(0),
m_pitch(0), m_pitch(0),
camera_barely_in_ceiling(false), camera_barely_in_ceiling(false),