9front - general discussion about 9front
 help / color / mirror / Atom feed
* games/doom: fix ouchface not being shown when it should be
@ 2015-07-29 16:09 qux
  0 siblings, 0 replies; only message in thread
From: qux @ 2015-07-29 16:09 UTC (permalink / raw)
  To: 9front

games/doom: fix ouchface not being shown when it should be

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.

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


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

only message in thread, other threads:[~2015-07-29 16:09 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:09 games/doom: fix ouchface not being shown when it should be 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).