9front - general discussion about 9front
 help / color / mirror / Atom feed
* games/doom: display correct message on medkit pickup when health low
@ 2015-07-29 16:10 qux
  0 siblings, 0 replies; only message in thread
From: qux @ 2015-07-29 16:10 UTC (permalink / raw)
  To: 9front

games/doom: display correct message on medkit pickup when health low

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

diff -r aa2b4dca05f1 sys/src/games/doom/p_inter.c
--- a/sys/src/games/doom/p_inter.c	Wed Jul 29 14:51:00 2015 +0200
+++ b/sys/src/games/doom/p_inter.c	Wed Jul 29 18:44:12 2015 +0300
@@ -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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-29 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-29 16:10 games/doom: display correct message on medkit pickup when health low qux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).