mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- dead code removal.
This commit is contained in:
parent
79dcd2c178
commit
591a3f623d
1 changed files with 0 additions and 71 deletions
|
@ -663,77 +663,6 @@ void DoSpringBoardDown(void)
|
|||
return;
|
||||
}
|
||||
|
||||
short FindSectorByTag(int x, int y, int tag)
|
||||
{
|
||||
short i = 0, near_sector = -1;
|
||||
int diff, near_diff = 9999999;
|
||||
short wallnum;
|
||||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
if (sector[i].lotag == tag)
|
||||
{
|
||||
// get the delta of the door/elevator
|
||||
wallnum = sector[i].wallptr;
|
||||
|
||||
// diff = labs(wall[wallnum].x - x) + labs(wall[wallnum].y - y);
|
||||
diff = Distance(wall[wallnum].x, wall[wallnum].y, x, y);
|
||||
|
||||
// if the door/elevator is closer than the last save it off
|
||||
if (diff < near_diff)
|
||||
{
|
||||
near_diff = diff;
|
||||
near_sector = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return near_sector;
|
||||
|
||||
}
|
||||
|
||||
short FindSectorByTag_Wall(short wallnum, int tag)
|
||||
{
|
||||
return FindSectorByTag(wall[wallnum].x, wall[wallnum].y, tag);
|
||||
}
|
||||
|
||||
short FindSectorByTag_Sprite(short SpriteNum, int tag)
|
||||
{
|
||||
return FindSectorByTag(sprite[SpriteNum].x, sprite[SpriteNum].y, tag);
|
||||
}
|
||||
|
||||
short FindSectorMidByTag(short sectnum, int tag)
|
||||
{
|
||||
short i = 0, near_sector = -1;
|
||||
int diff, near_diff = 9999999, x, y;
|
||||
int trash, fx, fy;
|
||||
|
||||
// Get the mid x,y of the sector
|
||||
SectorMidPoint(sectnum, &x, &y, &trash);
|
||||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
if (sector[i].lotag == tag)
|
||||
{
|
||||
// get the delta of the door/elevator
|
||||
SectorMidPoint(i, &fx, &fy, &trash);
|
||||
|
||||
// diff = labs(wall[wallnum].x - x) + labs(wall[wallnum].y - y);
|
||||
diff = Distance(fx, fy, x, y);
|
||||
|
||||
// if the door/elevator is closer than the last save it off
|
||||
if (diff < near_diff)
|
||||
{
|
||||
near_diff = diff;
|
||||
near_sector = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return near_sector;
|
||||
|
||||
}
|
||||
|
||||
short FindNextSectorByTag(short sectnum, int tag)
|
||||
{
|
||||
short next_sectnum, startwall, endwall, j;
|
||||
|
|
Loading…
Reference in a new issue