mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- added missing range checks to level compatibility handler
# Conflicts: # src/compatibility.cpp
This commit is contained in:
parent
990aad3b0c
commit
70e7f9f853
1 changed files with 12 additions and 5 deletions
|
@ -361,10 +361,13 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, OffsetSectorPlane)
|
|||
PARAM_INT(planeval);
|
||||
PARAM_FLOAT(delta);
|
||||
|
||||
sector_t *sec = &level.sectors[sector];
|
||||
secplane_t& plane = sector_t::floor == planeval? sec->floorplane : sec->ceilingplane;
|
||||
plane.ChangeHeight(delta);
|
||||
sec->ChangePlaneTexZ(planeval, delta);
|
||||
if ((unsigned)sector < level.sectors.Size())
|
||||
{
|
||||
sector_t *sec = &level.sectors[sector];
|
||||
secplane_t& plane = sector_t::floor == planeval? sec->floorplane : sec->ceilingplane;
|
||||
plane.ChangeHeight(delta);
|
||||
sec->ChangePlaneTexZ(planeval, delta);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -381,7 +384,11 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, AddSectorTag)
|
|||
PARAM_PROLOGUE;
|
||||
PARAM_INT(sector);
|
||||
PARAM_INT(tag);
|
||||
tagManager.AddSectorTag(sector, tag);
|
||||
|
||||
if ((unsigned)sector < level.sectors.Size())
|
||||
{
|
||||
tagManager.AddSectorTag(sector, tag);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue