From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io0-f175.google.com ([209.85.223.175]) by ur; Wed Jul 29 12:10:35 EDT 2015 Received: by ioea135 with SMTP id a135so26368315ioe.1 for <9front@9front.org>; Wed, 29 Jul 2015 09:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=EHbaW+PgNwcL0l/kedssXio/1ILOZbBYHCOgEZWe6fc=; b=T1gcPBs4g2A1aKASIpHxpgzeF/0V06Jz35JaS5kuKV/fzkYDYdPL7Ya2VF3zHALXBv QoL3+442nsvks+6H9z6ULr/gMR4qLEpyu89K+lsAxiY3g1QChwfMISKwapfyJQL9E0Mq A95aJtZFl6Tu+GZarD+rt0z/HzO26GbuRxKpQe7g+zYJj2z/K1kLPa905aSZZ9xncVng hSaD1CmRGEm5c1LdBjkwblW9yITVA/wfT1zv9cncgfzYJz20yw024S1gbCVshQp9Kysr TDuw8a4aFUKUxd0tK8CMQUaiMLrTptk7SyWUgIXm+UkFo6fmO4iIkdeE415Z+gw35wV4 m5LA== MIME-Version: 1.0 X-Received: by 10.107.5.149 with SMTP id 143mr3213466iof.109.1438186233013; Wed, 29 Jul 2015 09:10:33 -0700 (PDT) Received: by 10.107.56.68 with HTTP; Wed, 29 Jul 2015 09:10:32 -0700 (PDT) Date: Wed, 29 Jul 2015 19:10:32 +0300 Message-ID: List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: managed mobile lifecycle out-scaling proxy NoSQL interface Subject: games/doom: display correct message on medkit pickup when health low From: qux To: 9front@9front.org Content-Type: text/plain; charset=UTF-8 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;