File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Tempest::Vec3 Focus::displayPosition() const {
2323 if (npc)
2424 return npc->displayPosition ();
2525 if (item)
26- return item->position ();
26+ return item->displayPosition ();
2727 return {};
2828 }
2929
Original file line number Diff line number Diff line change @@ -210,6 +210,12 @@ std::string_view Item::description() const {
210210 return hitem->description ;
211211 }
212212
213+ Vec3 Item::displayPosition () const {
214+ if (auto b = bBox ())
215+ return pos + Vec3 (0 , b[1 ].y - b[0 ].y , 0 );
216+ return pos;
217+ }
218+
213219Tempest::Vec3 Item::position () const {
214220 return pos;
215221 }
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class Item : public Vob {
5353
5454 std::string_view displayName () const ;
5555 std::string_view description () const ;
56+ Tempest::Vec3 displayPosition () const ;
5657 Tempest::Vec3 position () const ;
5758 Tempest::Vec3 midPosition () const ;
5859 const Tempest::Vec3*bBox () const ;
You can’t perform that action at this time.
0 commit comments