From 25396d3ffdebe800b373d96515a0a109b8c47a44 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 30 Jul 2015 20:02:23 +0200 Subject: 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 --- sys/src/games/doom/p_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src') 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; -- cgit v1.2.3