Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 • committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -347,6 +347,8 @@ namespace Server
private static bool CanFit(Map map, int x, int y, int z)
{
bool hasSurface = false;
LandTile lt = map.Tiles.GetLandTile(x, y);
int lowZ = 0, avgZ = 0, topZ = 0;
@ -355,8 +357,8 @@ namespace Server
if ((landFlags & TileFlag.Impassable) != 0 && topZ > z && z + 16 > lowZ)
return false;
bool hasSurface = (landFlags & TileFlag.Impassable) == 0 && z == avgZ && !lt.Ignored;
if ((landFlags & TileFlag.Impassable) == 0 && z == avgZ && !lt.Ignored)
hasSurface = true;
StaticTile[] staticTiles = map.Tiles.GetStaticTiles(x, y);
@ -374,8 +376,8 @@ namespace Server
if ((surface || impassable) && staticTiles[i].Z + id.CalcHeight > z && z + 16 > staticTiles[i].Z)
return false;
hasSurface |= surface && !impassable && z == staticTiles[i].Z + id.CalcHeight;
if (surface && !impassable && z == staticTiles[i].Z + id.CalcHeight)
hasSurface = true;
}
Sector sector = map.GetSector(x, y);
@ -393,8 +395,8 @@ namespace Server
if ((surface || impassable) && item.Z + id.CalcHeight > z && z + 16 > item.Z)
return false;
hasSurface |= surface && !impassable && z == item.Z + id.CalcHeight;
if (surface && !impassable && z == item.Z + id.CalcHeight)
hasSurface = true;
}
}
@ -411,9 +413,9 @@ namespace Server
floor.Add(p);
for (int xo = -1; xo <= 1; ++xo)
for (int yo = -1; yo <= 1; ++yo)
if ((xo != 0 || yo != 0) && IsFloor(map, x + xo, y + yo, false))
RecurseFindFloor(map, x + xo, y + yo, floor);
for (int yo = -1; yo <= 1; ++yo)
if ((xo != 0 || yo != 0) && IsFloor(map, x + xo, y + yo, false))
RecurseFindFloor(map, x + xo, y + yo, floor);
}
[Flags]