mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix skin appearing wrongly for very short time, after changing your own skin with /skin
This commit is contained in:
parent
22f1fbbd79
commit
7cb8e414df
@ -93,8 +93,8 @@ namespace ClassicalSharp.Model {
|
||||
YQuad(m, x + sidesW + bodyW, y, bodyW, sidesW, x2, x1, z2, z1, y1, false); // bottom
|
||||
ZQuad(m, x + sidesW, y + sidesW, bodyW, bodyH, x1, x2, y1, y2, z1, true); // front
|
||||
ZQuad(m, x + sidesW + bodyW + sidesW, y + sidesW, bodyW, bodyH, x2, x1, y1, y2, z2, true); // back
|
||||
XQuad(m, x, y + sidesW, sidesW, bodyH, z1, z2, y1, y2, x2, true); // left
|
||||
XQuad(m, x + sidesW + bodyW, y + sidesW, sidesW, bodyH, z2, z1, y1, y2, x1, true); // right
|
||||
XQuad(m, x, y + sidesW, sidesW, bodyH, z1, z2, y1, y2, x2, true); // right
|
||||
XQuad(m, x + sidesW + bodyW, y + sidesW, sidesW, bodyH, z2, z1, y1, y2, x1, true); // left
|
||||
return new ModelPart(m.index - 6 * 4, 6 * 4, desc.RotX, desc.RotY, desc.RotZ);
|
||||
}
|
||||
|
||||
@ -121,8 +121,8 @@ namespace ClassicalSharp.Model {
|
||||
YQuad(m, x + sidesW, y + sidesW, bodyW, bodyH, x2, x1, z1, z2, y1, false); // bottom
|
||||
ZQuad(m, x + sidesW, y, bodyW, sidesW, x2, x1, y1, y2, z1, false); // front
|
||||
ZQuad(m, x + sidesW + bodyW, y, bodyW, sidesW, x1, x2, y2, y1, z2, false); // back
|
||||
XQuad(m, x, y + sidesW, sidesW, bodyH, y2, y1, z2, z1, x2, false); // left
|
||||
XQuad(m, x + sidesW + bodyW, y + sidesW, sidesW, bodyH, y1, y2, z2, z1, x1, false); // right
|
||||
XQuad(m, x, y + sidesW, sidesW, bodyH, y2, y1, z2, z1, x2, false); // right
|
||||
XQuad(m, x + sidesW + bodyW, y + sidesW, sidesW, bodyH, y1, y2, z2, z1, x1, false); // left
|
||||
|
||||
// rotate left and right 90 degrees
|
||||
for (int i = m.index - 8; i < m.index; i++) {
|
||||
|
@ -26,6 +26,7 @@ namespace ClassicalSharp.Entities {
|
||||
Player first = FirstOtherWithSameSkin();
|
||||
if (first == null) {
|
||||
game.Graphics.DeleteTexture(ref TextureId);
|
||||
ResetSkin();
|
||||
}
|
||||
ContextLost();
|
||||
}
|
||||
@ -182,7 +183,7 @@ namespace ClassicalSharp.Entities {
|
||||
if (Utils.IsUrlPrefix(SkinName, 0)) MobTextureId = TextureId;
|
||||
}
|
||||
|
||||
void ResetSkin() {
|
||||
internal void ResetSkin() {
|
||||
uScale = 1; vScale = 1;
|
||||
MobTextureId = -1;
|
||||
TextureId = -1;
|
||||
|
@ -51,8 +51,7 @@ namespace ClassicalSharp.Network {
|
||||
game.LocalPlayer.Despawn();
|
||||
// Always reset the texture here, in case other network players are using the same skin as us.
|
||||
// In that case, we don't want the fetching of new skin for us to delete the texture used by them.
|
||||
game.LocalPlayer.TextureId = -1;
|
||||
game.LocalPlayer.MobTextureId = -1;
|
||||
game.LocalPlayer.ResetSkin();
|
||||
game.LocalPlayer.fetchedSkin = false;
|
||||
|
||||
game.LocalPlayer.DisplayName = displayName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user