- fixed: ACS's GetSectorCeilingZ and GetSectorFloorZ expected integer coordinates.

This commit is contained in:
Christoph Oelckers 2016-04-27 15:41:22 +02:00
parent 3fd0d27efa
commit 38d92b23b9
1 changed files with 5 additions and 4 deletions

View File

@ -8750,23 +8750,24 @@ scriptwait:
{
int tag = STACK(3);
int secnum;
DVector2 pos(ACSToDouble(STACK(2)), ACSToDouble(STACK(1)));
double x = double(STACK(2));
double y = double(STACK(1));
double z = 0;
if (tag != 0)
secnum = P_FindFirstSectorFromTag (tag);
else
secnum = int(P_PointInSector (pos) - sectors);
secnum = int(P_PointInSector (x, y) - sectors);
if (secnum >= 0)
{
if (pcd == PCD_GETSECTORFLOORZ)
{
z = sectors[secnum].floorplane.ZatPoint (pos);
z = sectors[secnum].floorplane.ZatPoint (x, y);
}
else
{
z = sectors[secnum].ceilingplane.ZatPoint (pos);
z = sectors[secnum].ceilingplane.ZatPoint (x, y);
}
}
sp -= 2;