From 66cf5dd1d216b71899831fe8cbb676057c5757f7 Mon Sep 17 00:00:00 2001 From: James Haley Date: Wed, 2 Mar 2011 00:51:07 +0000 Subject: 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 --- src/strife/p_mobj.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/strife/p_mobj.c') 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 -- cgit v1.2.3