From 31e5261c981d89b2e83191c01e57a252cd94f2ae Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 28 Nov 2013 02:50:45 +0000 Subject: Fix Heretic demo desync caused by r1228 (thanks marineController). Subversion-branch: /branches/v2-branch Subversion-revision: 2755 --- src/heretic/p_user.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/heretic/p_user.c') diff --git a/src/heretic/p_user.c b/src/heretic/p_user.c index 79620630..4c9ae4c6 100644 --- a/src/heretic/p_user.c +++ b/src/heretic/p_user.c @@ -988,11 +988,18 @@ boolean P_UseArtifact(player_t * player, artitype_t arti) break; case arti_firebomb: angle = player->mo->angle >> ANGLETOFINESHIFT; + + // Vanilla bug here: + // Original code here looks like: + // (player->mo->flags2 & MF2_FEETARECLIPPED != 0), + // Which under C's operator precedence is: + // (player->mo->flags2 & (MF2_FEETARECLIPPED != 0)), + // Which simplifies to: + // (player->mo->flags2 & 1), mo = P_SpawnMobj(player->mo->x + 24 * finecosine[angle], player->mo->y + 24 * finesine[angle], player->mo->z - - 15 * FRACUNIT * - (player->mo->flags2 & MF2_FEETARECLIPPED) != 0, + 15 * FRACUNIT * (player->mo->flags2 & 1), MT_FIREBOMB); mo->target = player->mo; break; -- cgit v1.2.3