mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- fixed check for wallsprites on walls.
This completely ignored the case where a wall was flagged as one-sided which was the main reason with that sneaky sign in E2L1. The problem is not entirely fixed with this but now it will detect that it's on a wall.
This commit is contained in:
parent
4f8f85c634
commit
1a2b9d43f7
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ static int IsOnWall(tspritetype* tspr, int height)
|
||||||
int topz = (tspr->pos.Z - ((height * tspr->yrepeat) << 2));
|
int topz = (tspr->pos.Z - ((height * tspr->yrepeat) << 2));
|
||||||
for(auto& wal : wallsofsector(sect))
|
for(auto& wal : wallsofsector(sect))
|
||||||
{
|
{
|
||||||
if ((wal.nextsector == -1 || ((wal.nextSector()->ceilingz > topz) ||
|
if ((wal.nextsector == -1 || (wal.cstat & CSTAT_WALL_1WAY) || ((wal.nextSector()->ceilingz > topz) ||
|
||||||
wal.nextSector()->floorz < tspr->pos.Z)) && !GetClosestPointOnWall(tspr, &wal, &n))
|
wal.nextSector()->floorz < tspr->pos.Z)) && !GetClosestPointOnWall(tspr, &wal, &n))
|
||||||
{
|
{
|
||||||
int const dst = abs(tspr->pos.X - n.X) + abs(tspr->pos.Y - n.Y);
|
int const dst = abs(tspr->pos.X - n.X) + abs(tspr->pos.Y - n.Y);
|
||||||
|
|
Loading…
Reference in a new issue