Partial demo conclusion crash fix of invalid player/mo dereference

Still crashes, but now at an address I can't use gdb on...
This commit is contained in:
toaster 2023-01-28 22:22:08 +00:00
parent 594acca383
commit c8b8eba6e6

View file

@ -3038,8 +3038,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
fixed_t f1, f2;
fixed_t speed;
fixed_t playerScale = FixedDiv(player->mo->scale, mapobjectscale);
fixed_t scaleDiff = playerScale - FRACUNIT;
fixed_t playerScale;
fixed_t scaleDiff;
fixed_t cameraScale = mapobjectscale;
thiscam->old_x = thiscam->x;
@ -3064,6 +3064,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
return true;
}
playerScale = FixedDiv(player->mo->scale, mapobjectscale);
scaleDiff = playerScale - FRACUNIT;
if (thiscam == &camera[1]) // Camera 2
{
num = 1;