summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-07-30 20:00:43 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-07-30 20:00:43 +0200
commit5161442171315310dbd415c0214a851eb87200bb (patch)
tree65550ff41306bbac26ef623aff33200a68cc31e5 /sys/src/games
parentb579acef97171a057fb8f4c6fd2493690b5cf3c7 (diff)
games/doom: fix ouchface not being shown when it should be (thanks qu7uux)
due to a typo in st_stuff.c:ST_updateFaceWidget(), doomguy mistakenly never looks shocked when taking more than 20 damage, but rather when he gains more than 20 health while being hit. this is a cosmetic bug in all old versions of doom's executables, but it seems appropriate to fix. simple test: fire a rocket at a nearby wall, taking enough damage.
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/doom/st_stuff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/games/doom/st_stuff.c b/sys/src/games/doom/st_stuff.c
index a7c857837..a4ead5fec 100644
--- a/sys/src/games/doom/st_stuff.c
+++ b/sys/src/games/doom/st_stuff.c
@@ -801,7 +801,7 @@ void ST_updateFaceWidget(void)
// being attacked
priority = 7;
- if (plyr->health - st_oldhealth > ST_MUCHPAIN)
+ if (st_oldhealth - plyr->health > ST_MUCHPAIN)
{
st_facecount = ST_TURNCOUNT;
st_faceindex = ST_calcPainOffset() + ST_OUCHOFFSET;
@@ -854,7 +854,7 @@ void ST_updateFaceWidget(void)
// getting hurt because of your own damn stupidity
if (plyr->damagecount)
{
- if (plyr->health - st_oldhealth > ST_MUCHPAIN)
+ if (st_oldhealth - plyr->health > ST_MUCHPAIN)
{
priority = 7;
st_facecount = ST_TURNCOUNT;