sector.cpp: ensure that if scripts have told us not to render normally to the tile, that we still handle restoring our target & setting up the tile appropriately for what the script may have rendered

git-svn-id: https://svn.eduke32.com/eduke32@7891 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2019-08-07 16:19:00 +00:00 committed by Christoph Oelckers
parent 5fad944ed1
commit 67522909c5

View file

@ -387,7 +387,7 @@ static void G_SetupCamTile(int spriteNum, int tileNum, int smoothRatio)
int const noDraw = VM_OnEventWithReturn(EVENT_DISPLAYROOMSCAMERATILE, spriteNum, playerNum, 0);
if (noDraw == 1)
return;
goto finishTileSetup;
#ifdef DEBUGGINGAIDS
else if (EDUKE32_PREDICT_FALSE(noDraw != 0)) // event return values other than 0 and 1 are reserved
OSD_Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMSCAMERATILE return value must be 0 or 1, "
@ -403,6 +403,7 @@ static void G_SetupCamTile(int spriteNum, int tileNum, int smoothRatio)
display_mirror = saveMirror;
renderDrawMasks();
finishTileSetup:
renderRestoreTarget();
squarerotatetile(tileNum);
tileInvalidate(tileNum, -1, 255);