From 990d9ed40cf15b766c8029f6a573ee61c34f9ff1 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 21 Nov 2019 22:50:04 +0000 Subject: [PATCH] Correct location of followmobj scale write to match read (resolves #322). Requires deleting all of RC1's Record Attack replays with followmobj characters, but I think you'll agree that's a reasonable price to pay. --- src/g_game.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 5e1645901..edae9ec64 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4726,6 +4726,12 @@ void G_WriteGhostTic(mobj_t *ghost) oldghost.flags2 |= MF2_AMBUSH; } + if (ghost->player->followmobj->scale != ghost->scale) + { + followtic |= FZT_SCALE; + WRITEFIXED(demo_p,ghost->player->followmobj->scale); + } + temp = (INT16)((ghost->player->followmobj->x-ghost->x)>>8); WRITEINT16(demo_p,temp); temp = (INT16)((ghost->player->followmobj->y-ghost->y)>>8); @@ -4737,11 +4743,6 @@ void G_WriteGhostTic(mobj_t *ghost) WRITEUINT16(demo_p,ghost->player->followmobj->sprite); WRITEUINT8(demo_p,(ghost->player->followmobj->frame & FF_FRAMEMASK)); WRITEUINT8(demo_p,ghost->player->followmobj->color); - if (ghost->player->followmobj->scale != ghost->scale) - { - followtic |= FZT_SCALE; - WRITEFIXED(demo_p,ghost->player->followmobj->scale); - } *followtic_p = followtic; }