[Commands] Cleanup #setanim Command. (#1791)

- Cleanup message and logic.
- SetAppearance was not sending to self, so if you modified your own appearance, you wouldn't be able to see it.
This commit is contained in:
Kinglykrab
2021-11-21 10:10:52 -05:00
committed by GitHub
parent ec1cf68ce2
commit d73194c1f6
3 changed files with 56 additions and 11 deletions
+5 -2
View File
@@ -2999,12 +2999,15 @@ const int32& Mob::SetMana(int32 amount)
void Mob::SetAppearance(EmuAppearance app, bool iIgnoreSelf) {
if (_appearance == app)
if (_appearance == app) {
return;
}
_appearance = app;
SendAppearancePacket(AT_Anim, GetAppearanceValue(app), true, iIgnoreSelf);
if (this->IsClient() && this->IsAIControlled())
if (IsClient() && IsAIControlled()) {
SendAppearancePacket(AT_Anim, ANIM_FREEZE, false, false);
}
}
bool Mob::UpdateActiveLight()