Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Core/GameObject: Fix interaction distance with GameObjects in all cor…
…ner cases by overriding Object:_IsWithinDist. Distance calculation to GO's need to take in account GameObjectDisplayInfoDBC entries, otherwise distance would not be calculated from the edges properly and ie. quest interaction with large gameobjects would fail.
- Loading branch information
1 parent
69b7115
commit b560090
Showing
2 changed files
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b560090
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this fix the always seen hunter traps ?
b560090
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no it shouldn't
b560090
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is a good idea. _IsWithinDist may be called frequently and virtual function is not efficient. Why not replace _IsWithinDist with IsInRange when object size needs to be considered, or override GameObject::_IsWithinDist without using virtual function (if WorldObject::_IsWithinDist is called you can use template or cast to apply GameObject::_IsWithinDist)?