mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix model sometimes not succesfully changing to humanoid
This commit is contained in:
parent
ac71822d5f
commit
d67956a2ca
@ -288,7 +288,7 @@ namespace MCGalaxy {
|
|||||||
|
|
||||||
void Spawn(VisibleEntity vis, Position pos, Orientation rot, string skin, string name, string model) {
|
void Spawn(VisibleEntity vis, Position pos, Orientation rot, string skin, string name, string model) {
|
||||||
p.Session.SendSpawnEntity(vis.id, name, skin, pos, rot);
|
p.Session.SendSpawnEntity(vis.id, name, skin, pos, rot);
|
||||||
_SendModel(vis, model, true);
|
_SendModel(vis, model);
|
||||||
_SendRot(vis, rot);
|
_SendRot(vis, rot);
|
||||||
_SendScales(vis);
|
_SendScales(vis);
|
||||||
}
|
}
|
||||||
@ -304,12 +304,12 @@ namespace MCGalaxy {
|
|||||||
lock (locker) {
|
lock (locker) {
|
||||||
VisibleEntity vis;
|
VisibleEntity vis;
|
||||||
if (!visible.TryGetValue(e, out vis)) return;
|
if (!visible.TryGetValue(e, out vis)) return;
|
||||||
_SendModel(vis, model, false);
|
_SendModel(vis, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void _SendModel(VisibleEntity vis, string model, bool spawning) {
|
void _SendModel(VisibleEntity vis, string model) {
|
||||||
if (p.hasChangeModel) {
|
if (p.hasChangeModel) {
|
||||||
if (!(spawning && model.CaselessEq("humanoid"))) p.Session.SendChangeModel(vis.id, model);
|
p.Session.SendChangeModel(vis.id, model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void _SendRot(VisibleEntity vis, Orientation rot) {
|
void _SendRot(VisibleEntity vis, Orientation rot) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user