- fixed cherry picked commit based on code that didn't get into the maintenance branch.

This commit is contained in:
Christoph Oelckers 2019-01-04 10:20:18 +01:00
parent bbe00562eb
commit 526268a216

View file

@ -333,9 +333,9 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, OffsetSectorPlane)
PARAM_INT(planeval); PARAM_INT(planeval);
PARAM_FLOAT(delta); PARAM_FLOAT(delta);
if ((unsigned)sector < self->Level->sectors.Size()) if ((unsigned)sector < level.sectors.Size())
{ {
sector_t *sec = &self->Level->sectors[sector]; sector_t *sec = &level.sectors[sector];
secplane_t& plane = sector_t::floor == planeval? sec->floorplane : sec->ceilingplane; secplane_t& plane = sector_t::floor == planeval? sec->floorplane : sec->ceilingplane;
plane.ChangeHeight(delta); plane.ChangeHeight(delta);
sec->ChangePlaneTexZ(planeval, delta); sec->ChangePlaneTexZ(planeval, delta);
@ -357,7 +357,7 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, AddSectorTag)
PARAM_INT(sector); PARAM_INT(sector);
PARAM_INT(tag); PARAM_INT(tag);
if ((unsigned)sector < self->Level->sectors.Size()) if ((unsigned)sector < level.sectors.Size())
{ {
tagManager.AddSectorTag(sector, tag); tagManager.AddSectorTag(sector, tag);
} }