summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-05-01 20:29:24 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-01 20:29:24 -0400
commit103fba002ce4d5ec0b9f130681d6636ed52f0219 (patch)
tree40d582dd34ad9354a773fbf81d57073a0bd34663 /src
parent7b14630d3f4282ecb6ab576af26a7a109615a885 (diff)
parenteb990acb343a25f97b3db9d97aaf2e5492d92900 (diff)
downloadtmwa-103fba002ce4d5ec0b9f130681d6636ed52f0219.tar.gz
tmwa-103fba002ce4d5ec0b9f130681d6636ed52f0219.tar.bz2
tmwa-103fba002ce4d5ec0b9f130681d6636ed52f0219.tar.xz
tmwa-103fba002ce4d5ec0b9f130681d6636ed52f0219.zip
Merge pull request #218 from mekolat/reallydead
send hp 0 in pc_readparam when PC is dead
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 63b1497..6057278 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -3435,6 +3435,8 @@ int pc_readparam(dumb_ptr<block_list> bl, SP type)
val = sd ? pc_nextjobexp(sd) : 0;
break;
case SP::HP:
+ if (sd && pc_isdead(sd))
+ break; // val = 0
val = battle_get_hp(bl);
break;
case SP::MAXHP: