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
This commit is contained in:
cinap_lenrek 2015-07-30 20:02:23 +02:00
parent 5161442171
commit 25396d3ffd

View file

@ -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;