Merge pull request #1193 from noudess/gmmove

Use heading in GMMove and change FaceTarget not to turn boat
This commit is contained in:
Chris Miles 2021-01-30 15:29:05 -06:00 committed by GitHub
commit 7eba9552e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1734,6 +1734,7 @@ void Mob::GMMove(float x, float y, float z, float heading, bool SendUpdate) {
m_Position.x = x;
m_Position.y = y;
m_Position.z = z;
SetHeading(heading);
mMovementManager->SendCommandToClients(this, 0.0, 0.0, 0.0, 0.0, 0, ClientRangeAny);
if (IsNPC()) {
@ -2820,6 +2821,11 @@ bool Mob::HateSummon() {
}
void Mob::FaceTarget(Mob* mob_to_face /*= 0*/) {
if (IsBoat()) {
return;
}
Mob* faced_mob = mob_to_face;
if(!faced_mob) {
if(!GetTarget()) {