9front - general discussion about 9front
 help / color / mirror / Atom feed
From: qux <qu7uux@gmail.com>
To: 9front@9front.org
Subject: games/doom: display correct message on medkit pickup when health low
Date: Wed, 29 Jul 2015 19:10:32 +0300	[thread overview]
Message-ID: <CAAGZai+=yz1wn0u7AK=RnV7nbEvvV3XW2qV0dGAdA=f9Apdt_w@mail.gmail.com> (raw)

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;


                 reply	other threads:[~2015-07-29 16:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAGZai+=yz1wn0u7AK=RnV7nbEvvV3XW2qV0dGAdA=f9Apdt_w@mail.gmail.com' \
    --to=qu7uux@gmail.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).