Skip to content

Commit

Permalink
KOTOR: Add specific tooltip anchor for doors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius committed Feb 2, 2019
1 parent ba69552 commit c667a38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engines/kotor/door.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ bool Door::testCollision(const glm::vec3 &orig, const glm::vec3 &dest) const {
return !isOpen() && _walkmesh.testCollision(orig, dest);
}

void Door::getTooltipAnchor(float &x, float &y, float &z) const {
_model->getAbsolutePosition(x, y, z);
z += _model->getDepth() / 2;
}

bool Door::open(Object *opener) {
// TODO: Door::open(): Open in direction of the opener

Expand Down
2 changes: 2 additions & 0 deletions src/engines/kotor/door.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class Door : public Situated {

bool testCollision(const glm::vec3 &orig, const glm::vec3 &dest) const;

virtual void getTooltipAnchor(float &x, float &y, float &z) const;

protected:
/** Load door-specific properties. */
void loadObject(const Aurora::GFF3Struct &gff);
Expand Down

0 comments on commit c667a38

Please sign in to comment.