ref: 25396d3ffdebe800b373d96515a0a109b8c47a44
parent: 5161442171315310dbd415c0214a851eb87200bb
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Jul 30 16:02:23 EDT 2015
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
--- a/sys/src/games/doom/p_inter.c
+++ b/sys/src/games/doom/p_inter.c
@@ -477,7 +477,7 @@
if (!P_GiveBody (player, 25))
return;
- if (player->health < 25)
+ if (player->health < 50)
player->message = GOTMEDINEED;
else
player->message = GOTMEDIKIT;