mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix player name showing in tab list, when player disconnects mid-way through loading map
This commit is contained in:
parent
16a0a65947
commit
c45bcac04f
@ -76,7 +76,7 @@ namespace MCGalaxy.Drawing.Ops {
|
||||
{
|
||||
int xx = C.X - x, yy = y - Min.Y, zz = C.Z - z;
|
||||
int curHeight = Invert ? yy : height - yy;
|
||||
if (curHeight == 0) continue;
|
||||
if (curHeight == 0) continue;
|
||||
|
||||
double curRadius = Radius * ((double)curHeight / (double)height);
|
||||
int absx = Math.Abs(xx), absz = Math.Abs(zz);
|
||||
|
@ -110,11 +110,14 @@ namespace MCGalaxy {
|
||||
Position pos = level.SpawnPos;
|
||||
Orientation rot = p.Rot;
|
||||
byte yaw = level.rotx, pitch = level.roty;
|
||||
// in case player disconnected mid-way through loading map
|
||||
if (p.disconnected) return;
|
||||
|
||||
OnPlayerSpawningEvent.Call(p, ref pos, ref yaw, ref pitch, false);
|
||||
rot.RotY = yaw; rot.HeadX = pitch;
|
||||
p.Pos = pos;
|
||||
p.SetYawPitch(yaw, pitch);
|
||||
if (p.disconnected) return;
|
||||
|
||||
Entities.SpawnEntities(p, pos, rot);
|
||||
OnJoinedLevelEvent.Call(p, prevLevel, level, ref announce);
|
||||
|
Loading…
x
Reference in New Issue
Block a user