Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -12,14 +12,12 @@ namespace Server.Movement
private const TileFlag ImpassableSurface = TileFlag.Impassable | TileFlag.Surface;
private List<Mobile>[] m_MobPools = new List<Mobile>[3]
{
private List<Mobile>[] m_MobPools = {
new List<Mobile>(), new List<Mobile>(),
new List<Mobile>()
};
private List<Item>[] m_Pools = new List<Item>[4]
{
private List<Item>[] m_Pools = {
new List<Item>(), new List<Item>(),
new List<Item>(), new List<Item>()
};
@ -64,8 +62,6 @@ namespace Server.Movement
return false;
}
int startZ, startTop;
List<Item> itemsStart = m_Pools[0];
List<Item> itemsForward = m_Pools[1];
List<Item> itemsLeft = m_Pools[2];
@ -217,27 +213,25 @@ namespace Server.Movement
}
}
GetStartZ(m, map, loc, itemsStart, out startZ, out startTop);
GetStartZ(m, map, loc, itemsStart, out int startZ, out int startTop);
bool moveIsOk = Check(map, m, itemsForward, mobsForward, xForward, yForward, startTop, startZ, m.CanSwim,
m.CantWalk, out newZ);
if (moveIsOk && checkDiagonals)
{
int hold;
if (m.Player && m.AccessLevel < AccessLevel.GameMaster)
{
if (!Check(map, m, itemsLeft, mobsLeft, xLeft, yLeft, startTop, startZ, m.CanSwim, m.CantWalk,
out hold) || !Check(map, m, itemsRight, mobsRight, xRight, yRight, startTop, startZ, m.CanSwim,
m.CantWalk, out hold))
out _) || !Check(map, m, itemsRight, mobsRight, xRight, yRight, startTop, startZ, m.CanSwim,
m.CantWalk, out _))
moveIsOk = false;
}
else
{
if (!Check(map, m, itemsLeft, mobsLeft, xLeft, yLeft, startTop, startZ, m.CanSwim, m.CantWalk,
out hold) && !Check(map, m, itemsRight, mobsRight, xRight, yRight, startTop, startZ, m.CanSwim,
m.CantWalk, out hold))
out _) && !Check(map, m, itemsRight, mobsRight, xRight, yRight, startTop, startZ, m.CanSwim,
m.CantWalk, out _))
moveIsOk = false;
}
}
@ -358,7 +352,6 @@ namespace Server.Movement
int itemZ = tile.Z;
int itemTop = itemZ;
int ourZ = itemZ + itemData.CalcHeight;
int ourTop = ourZ + PersonHeight;
int testTop = checkTop;
if (moveIsOk)
@ -415,7 +408,6 @@ namespace Server.Movement
int itemZ = item.Z;
int itemTop = itemZ;
int ourZ = itemZ + itemData.CalcHeight;
int ourTop = ourZ + PersonHeight;
int testTop = checkTop;
if (moveIsOk)
@ -458,7 +450,6 @@ namespace Server.Movement
if (considerLand && !landBlocks && stepTop >= landZ)
{
int ourZ = landCenter;
int ourTop = ourZ + PersonHeight;
int testTop = checkTop;
if (ourZ + PersonHeight > testTop)