summaryrefslogtreecommitdiff
path: root/src/strife/p_mobj.c
diff options
context:
space:
mode:
authorJames Haley2011-03-02 00:51:07 +0000
committerJames Haley2011-03-02 00:51:07 +0000
commit66cf5dd1d216b71899831fe8cbb676057c5757f7 (patch)
treedfa278067cae6484f335a53adb99d4b9122583ed /src/strife/p_mobj.c
parentaf19c6755955d7d397454cd2fd988270ee2f0561 (diff)
downloadchocolate-doom-66cf5dd1d216b71899831fe8cbb676057c5757f7.tar.gz
chocolate-doom-66cf5dd1d216b71899831fe8cbb676057c5757f7.tar.bz2
chocolate-doom-66cf5dd1d216b71899831fe8cbb676057c5757f7.zip
Fixed automap background color, size of plrkilledmsg buffer, a bug which
caused the scanner to never be depleted from the inventory, and emulation of seemingly inconsequential undefined behavior in P_XYMovement via use of negative numspechit is currently addressed by changing the branch condition to > 0. Subversion-branch: /branches/strife-branch Subversion-revision: 2286
Diffstat (limited to 'src/strife/p_mobj.c')
-rw-r--r--src/strife/p_mobj.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/strife/p_mobj.c b/src/strife/p_mobj.c
index f0743125..f8676a95 100644
--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -200,10 +200,15 @@ void P_XYMovement (mobj_t* mo)
else if (mo->flags & MF_MISSILE)
{
// haley 20110203: [STRIFE]
- // This modification allows missiles to activate shoot specials
+ // This modification allows missiles to activate shoot specials.
+ // *** BUG: In vanilla Strife the second condition is simply
+ // if(numspechit). However, numspechit can be negative, and
+ // when it is, this accesses spechit[-2]. This always causes the
+ // DOS exe to read from NULL, and the 'special' value there (in
+ // DOS 6.22 at least) is 0x70, which does nothing.
if(blockingline && blockingline->special)
P_ShootSpecialLine(mo, blockingline);
- if(numspechit)
+ if(numspechit > 0)
P_ShootSpecialLine(mo, spechit[numspechit-1]);
// explode a missile