diff --git a/Levels/Level.Physics.cs b/Levels/Level.Physics.cs index 9d83a36a3..0c4275041 100644 --- a/Levels/Level.Physics.cs +++ b/Levels/Level.Physics.cs @@ -180,9 +180,10 @@ namespace MCGalaxy { for (int i = 0; i < ListUpdate.Count; i++) { Update C = ListUpdate.Items[i]; try { - PhysicsArgs info = C.data; - if (DoPhysicsBlockchange(C.b, C.type, false, info, 0, true)) - bulkSender.Add(C.b, C.type, 0); + byte type = C.data.Data; + C.data.Data = 0; + if (DoPhysicsBlockchange(C.b, type, false, C.data, 0, true)) + bulkSender.Add(C.b, type, 0); } catch { Server.s.Log("Phys update issue"); } @@ -382,15 +383,14 @@ namespace MCGalaxy { } } - public class Update { + public struct Update { public int b; public PhysicsArgs data; - public byte type; public Update(int b, byte type, PhysicsArgs data = default(PhysicsArgs)) { this.b = b; - this.type = type; this.data = data; + this.data.Data = type; } } } \ No newline at end of file diff --git a/Levels/PhysicsArgs.cs b/Levels/PhysicsArgs.cs index dc8196b33..b90798fe5 100644 --- a/Levels/PhysicsArgs.cs +++ b/Levels/PhysicsArgs.cs @@ -48,7 +48,7 @@ namespace MCGalaxy.BlockPhysics { Raw |= (uint)value << 14; } } - public byte Time { + public byte Data { get { return (byte)(Raw >> 22); } set { Raw &= ~(0xFFu << 22); Raw |= (uint)value << 22; } diff --git a/Server/Properties.cs b/Server/Properties.cs index 5b1a0ab18..3eebb228c 100644 --- a/Server/Properties.cs +++ b/Server/Properties.cs @@ -137,11 +137,11 @@ namespace MCGalaxy { break; case "rplimit": - try { Server.rpLimit = Convert.ToInt16(value); } + try { Server.rpLimit = Convert.ToUInt16(value); } catch { Server.s.Log("rpLimit invalid! setting to default."); } break; case "rplimit-norm": - try { Server.rpNormLimit = Convert.ToInt16(value); } + try { Server.rpNormLimit = Convert.ToUInt16(value); } catch { Server.s.Log("rpLimit-norm invalid! setting to default."); } break;