From f7d50a80782376d2e1c068e4d0a7ce9632f28bda Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 23 Aug 2017 22:32:10 +0200 Subject: Respect object property hp_max field for players (#6287) * Respect object property hp_max field for players This allows modders to configure the maximal HP per player * Statbars: Downscale bar to full 20 HP when exceeding this value Add default max HP for players and breath constants to builtin Document the constants * Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT --- src/remoteplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/remoteplayer.cpp') diff --git a/src/remoteplayer.cpp b/src/remoteplayer.cpp index 20c18ee15..c108ad3f1 100644 --- a/src/remoteplayer.cpp +++ b/src/remoteplayer.cpp @@ -100,7 +100,7 @@ void RemotePlayer::deSerialize(std::istream &is, const std::string &playername, try { sao->setHPRaw(args.getS32("hp")); } catch(SettingNotFoundException &e) { - sao->setHPRaw(PLAYER_MAX_HP); + sao->setHPRaw(PLAYER_MAX_HP_DEFAULT); } try { -- cgit v1.2.3