mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed: ACS's GetSectorCeilingZ and GetSectorFloorZ expected integer coordinates.
This commit is contained in:
parent
3fd0d27efa
commit
38d92b23b9
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue