Code cleanup (#188)

This commit is contained in:
Kamron Batman 2020-08-01 08:40:06 -07:00 committed by GitHub
parent df53c16620
commit 010fd9402a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
185 changed files with 1052 additions and 1271 deletions

View file

@ -2550,7 +2550,7 @@ namespace Server
}
if (HeldBy != null)
Timer.DelayCall(TimeSpan.Zero, FixHolding_Sandbox);
Timer.DelayCall(FixHolding_Sandbox);
// if (version < 9)
VerifyCompactInfo();
@ -3070,18 +3070,12 @@ namespace Server
if (checkTop == checkZ && !id.Surface)
++checkTop;
var zStart = checkZ - z;
var zEnd = checkTop - z;
var zStart = Math.Max(checkZ - z, 0);
var zEnd = Math.Min(checkTop - z, 19);
if (zStart >= 20 || zEnd < 0)
continue;
if (zStart < 0)
zStart = 0;
if (zEnd > 19)
zEnd = 19;
var bitCount = zEnd - zStart;
m_OpenSlots &= ~(((1 << bitCount) - 1) << zStart);
@ -3098,18 +3092,12 @@ namespace Server
if (checkTop == checkZ && !id.Surface)
++checkTop;
var zStart = checkZ - z;
var zEnd = checkTop - z;
var zStart = Math.Max(checkZ - z, 0);
var zEnd = Math.Min(checkTop - z, 19);
if (zStart >= 20 || zEnd < 0)
continue;
if (zStart < 0)
zStart = 0;
if (zEnd > 19)
zEnd = 19;
var bitCount = zEnd - zStart;
m_OpenSlots &= ~(((1 << bitCount) - 1) << zStart);