Skip to content

Commit

Permalink
fix(zscript): 'Screen->SetExDoor()'/'mapdata->SetExDoor()' not openin…
Browse files Browse the repository at this point in the history
…g matching doors
  • Loading branch information
EmilyV99 authored and connorjclark committed Dec 20, 2023
1 parent 180b66f commit 88f2ab4
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/zc/ffscript.cpp
Expand Up @@ -22562,12 +22562,7 @@ void set_register(int32_t arg, int32_t value)
else if(unsigned(ind) > 7)
Z_scripterrlog("Invalid index '%d' passed to 'Screen->SetExDoor()'; must be 0-7\n", ind);
else
{
int bit = 1<<ind;
if(!(game->xdoors[mi][dir]&bit) == !value)
break; //no change
SETFLAG(game->xdoors[mi][dir], bit, value);
}
set_xdoorstate(mi, dir, ind);
break;
}

Expand Down Expand Up @@ -24151,12 +24146,7 @@ void set_register(int32_t arg, int32_t value)
else if(unsigned(ind) > 7)
Z_scripterrlog("Invalid index '%d' passed to 'mapdata->SetExDoor()'; must be 0-7\n", ind);
else
{
int bit = 1<<ind;
if(!(game->xdoors[mi][dir]&bit) == !value)
break; //no change
SETFLAG(game->xdoors[mi][dir], bit, value);
}
set_xdoorstate(mi, dir, ind);
}
else Z_scripterrlog("mapdata->SetExDoor pointer (%d) is either invalid or uninitialised.\n", ri->mapsref);
break;
Expand Down

0 comments on commit 88f2ab4

Please sign in to comment.