diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-30 20:02:23 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-07-30 20:02:23 +0200 |
commit | 25396d3ffdebe800b373d96515a0a109b8c47a44 (patch) | |
tree | 4693426e77c631d023f310be97f284e252a10e6e /sys/src/games | |
parent | 5161442171315310dbd415c0214a851eb87200bb (diff) |
games/doom: display correct message on medkit pickup when health low (thanks qu7uux)
due to a typo in p_inter.c:P_TouchSpecialThing(), a message that is supposed
to show up when the player picks up a medikit while low on health (< 25), is
never displayed. the check for low health is done after the health is already
increased, so the condition is never true.
a cosmetic bug in all old doom executables that also seems interesting to fix.
to test: compare message displayed when picking up a medikit with and without
the patch
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/doom/p_inter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/games/doom/p_inter.c b/sys/src/games/doom/p_inter.c index eea30f1d1..6cd68b241 100644 --- a/sys/src/games/doom/p_inter.c +++ b/sys/src/games/doom/p_inter.c @@ -477,7 +477,7 @@ P_TouchSpecialThing if (!P_GiveBody (player, 25)) return; - if (player->health < 25) + if (player->health < 50) player->message = GOTMEDINEED; else player->message = GOTMEDIKIT; |