ref: 3249915383be2a3c1de0da8de066b04202ac3d5b
parent: d1f3968dfd088aaec92e523bec00d4abeb4d0a73
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;
--
⑨