Relocated 'stop movement' code into class Mob from class Bot

This commit is contained in:
Uleat
2018-02-01 05:38:10 -05:00
parent 8805021960
commit d71dbd1751
4 changed files with 24 additions and 21 deletions
+15
View File
@@ -1437,6 +1437,21 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal
}
}
void Mob::StopMoving() {
FixZ();
SetCurrentSpeed(0);
if (moved)
moved = false;
}
void Mob::StopMoving(float new_heading) {
SetHeading(new_heading);
FixZ();
SetCurrentSpeed(0);
if (moved)
moved = false;
}
/* Used for mobs standing still - this does not send a delta */
void Mob::SendPosition() {
auto app = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));