Melee 'facing' code updated to client derived function

These new functions are derived from the client
The need was because the old function sometimes didn't line
up with the client generated messages.
This commit is contained in:
Michael Cook (mackal)
2014-05-05 15:29:29 -04:00
parent 5af0cb2844
commit eb33e8ae11
4 changed files with 55 additions and 4 deletions
+3 -3
View File
@@ -361,13 +361,13 @@ bool Client::Process() {
aa_los_them.z = aa_los_them_mob->GetZ();
los_status = CheckLosFN(auto_attack_target);
aa_los_me_heading = GetHeading();
los_status_facing = aa_los_them_mob->InFrontMob(this, aa_los_them.x, aa_los_them.y);
los_status_facing = IsFacingMob(aa_los_them_mob);
}
// If only our heading changes, we can skip the CheckLosFN call
// but above we still need to update los_status_facing
if (aa_los_me_heading != GetHeading()) {
aa_los_me_heading = GetHeading();
los_status_facing = aa_los_them_mob->InFrontMob(this, aa_los_them.x, aa_los_them.y);
los_status_facing = IsFacingMob(aa_los_them_mob);
}
}
else
@@ -381,7 +381,7 @@ bool Client::Process() {
aa_los_them.y = aa_los_them_mob->GetY();
aa_los_them.z = aa_los_them_mob->GetZ();
los_status = CheckLosFN(auto_attack_target);
los_status_facing = aa_los_them_mob->InFrontMob(this, aa_los_them.x, aa_los_them.y);
los_status_facing = IsFacingMob(aa_los_them_mob);
}
if (!CombatRange(auto_attack_target))