Make sure to invalidate sector.lines and all ffloors for the previous map's sectors as well

(yes, I changed my mind about doing it in public repo, probably too much hassle if we want 2.1.16 out soon)
This commit is contained in:
Monster Iestyn 2016-07-10 17:35:05 +01:00
parent 61304dd833
commit c8a2eaf8a6

View file

@ -395,6 +395,7 @@ void LUA_InvalidateLevel(void)
{
thinker_t *th;
size_t i;
ffloor_t *rover = NULL;
if (!gL)
return;
@ -406,7 +407,15 @@ void LUA_InvalidateLevel(void)
for (i = 0; i < numsubsectors; i++)
LUA_InvalidateUserdata(&subsectors[i]);
for (i = 0; i < numsectors; i++)
{
LUA_InvalidateUserdata(&sectors[i]);
LUA_InvalidateUserdata(sectors[i].lines);
if (sectors[i].ffloors)
{
for (rover = sectors[i].ffloors; rover; rover = rover->next)
LUA_InvalidateUserdata(rover);
}
}
for (i = 0; i < numlines; i++)
{
LUA_InvalidateUserdata(&lines[i]);