mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-25 14:17:29 -04:00
Core: Now doing /reload doesn't slightly move you up.
This commit is contained in:
parent
b9f083969f
commit
c794c5dfe4
@ -353,7 +353,10 @@ namespace MCGalaxy {
|
|||||||
|
|
||||||
/// <summary> Sends a packet indicating an entity was spawned in the current map
|
/// <summary> Sends a packet indicating an entity was spawned in the current map
|
||||||
/// at the given absolute position + coordinates </summary>
|
/// 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];
|
byte[] buffer = new byte[74];
|
||||||
buffer[0] = Opcode.AddEntity;
|
buffer[0] = Opcode.AddEntity;
|
||||||
buffer[1] = id;
|
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) {
|
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];
|
byte[] buffer = new byte[138];
|
||||||
buffer[0] = Opcode.CpeExtAddEntity2;
|
buffer[0] = Opcode.CpeExtAddEntity2;
|
||||||
buffer[1] = id;
|
buffer[1] = id;
|
||||||
|
@ -166,9 +166,9 @@ namespace MCGalaxy {
|
|||||||
Game.InfectMessages = PlayerDB.GetInfectMessages(this);
|
Game.InfectMessages = PlayerDB.GetInfectMessages(this);
|
||||||
Server.zombie.PlayerJoinedServer(this);
|
Server.zombie.PlayerJoinedServer(this);
|
||||||
|
|
||||||
ushort x = (ushort)((0.5 + level.spawnx) * 32);
|
ushort x = (ushort)(level.spawnx * 32 + 16);
|
||||||
ushort y = (ushort)((1 + level.spawny) * 32);
|
ushort y = (ushort)(level.spawny * 32 + 32);
|
||||||
ushort z = (ushort)((0.5 + level.spawnz) * 32);
|
ushort z = (ushort)(level.spawnz * 32 + 16);
|
||||||
pos = new ushort[3] { x, y, z };
|
pos = new ushort[3] { x, y, z };
|
||||||
rot = new byte[2] { level.rotx, level.roty };
|
rot = new byte[2] { level.rotx, level.roty };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user