Core: Now doing /reload doesn't slightly move you up.

This commit is contained in:
UnknownShadow200 2016-11-20 23:07:25 +11:00
parent b9f083969f
commit c794c5dfe4
2 changed files with 10 additions and 4 deletions

View File

@ -353,7 +353,10 @@ namespace MCGalaxy {
/// <summary> Sends a packet indicating an entity was spawned in the current map
/// at the given absolute position + coordinates </summary>
public void SendSpawn(byte id, string name, ushort x, ushort y, ushort z, byte rotx, byte roty) {
public void SendSpawn(byte id, string name, ushort x, ushort y, ushort z, byte rotx, byte roty) {
// NOTE: Fix for standard clients
if (id == Entities.SelfID) y -= 22;
byte[] buffer = new byte[74];
buffer[0] = Opcode.AddEntity;
buffer[1] = id;
@ -453,6 +456,9 @@ namespace MCGalaxy {
}
public void SendExtAddEntity2(byte id, string skinName, string displayName, ushort x, ushort y, ushort z, byte rotx, byte roty) {
// NOTE: Fix for standard clients
if (id == Entities.SelfID) y -= 22;
byte[] buffer = new byte[138];
buffer[0] = Opcode.CpeExtAddEntity2;
buffer[1] = id;

View File

@ -166,9 +166,9 @@ namespace MCGalaxy {
Game.InfectMessages = PlayerDB.GetInfectMessages(this);
Server.zombie.PlayerJoinedServer(this);
ushort x = (ushort)((0.5 + level.spawnx) * 32);
ushort y = (ushort)((1 + level.spawny) * 32);
ushort z = (ushort)((0.5 + level.spawnz) * 32);
ushort x = (ushort)(level.spawnx * 32 + 16);
ushort y = (ushort)(level.spawny * 32 + 32);
ushort z = (ushort)(level.spawnz * 32 + 16);
pos = new ushort[3] { x, y, z };
rot = new byte[2] { level.rotx, level.roty };