mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-08 22:59:29 -04:00
Fix SendModel not changing when sending humanoid model
This commit is contained in:
parent
8ba17b19cc
commit
03db436cd1
@ -293,7 +293,7 @@ namespace MCGalaxy {
|
||||
|
||||
void Spawn(VisibleEntity vis, Position pos, Orientation rot, string skin, string name, string model) {
|
||||
p.Session.SendSpawnEntity(vis.id, name, skin, pos, rot);
|
||||
_SendModel(vis, model);
|
||||
_SendModel(vis, model, true);
|
||||
_SendRot(vis, rot);
|
||||
_SendScales(vis);
|
||||
}
|
||||
@ -305,13 +305,13 @@ namespace MCGalaxy {
|
||||
lock (visLocker) {
|
||||
VisibleEntity vis;
|
||||
if (!visible.TryGetValue(e, out vis)) return;
|
||||
_SendModel(vis, model);
|
||||
_SendModel(vis, model, false);
|
||||
}
|
||||
}
|
||||
void _SendModel(VisibleEntity vis, string model) {
|
||||
void _SendModel(VisibleEntity vis, string model, bool spawning) {
|
||||
if (p.hasChangeModel) {
|
||||
OnSendingModelEvent.Call(vis.e, ref model, p);
|
||||
if (!model.CaselessEq("humanoid")) p.Session.SendChangeModel(vis.id, model);
|
||||
if (!(spawning && model.CaselessEq("humanoid"))) p.Session.SendChangeModel(vis.id, model);
|
||||
}
|
||||
}
|
||||
void _SendRot(VisibleEntity vis, Orientation rot) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user