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
+2
View File
@@ -125,6 +125,8 @@ public:
// less than 56 is in front, greater than 56 is usually where the client generates the messages
inline bool InFrontMob(Mob *other = 0, float ourx = 0.0f, float oury = 0.0f) const
{ return (!other || other == this) ? true : MobAngle(other, ourx, oury) < 56.0f; }
bool IsFacingMob(Mob *other); // kind of does the same as InFrontMob, but derived from client
float HeadingAngleToMob(Mob *other); // to keep consistent with client generated messages
virtual void RangedAttack(Mob* other) { }
virtual void ThrowingAttack(Mob* other) { }
uint16 GetThrownDamage(int16 wDmg, int32& TotalDmg, int& minDmg);