mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:23:51 +00:00
Fix tooltip position when hovering the crosshair over NPCs
This commit is contained in:
parent
0ee0dbdb97
commit
66a754e9aa
1 changed files with 1 additions and 7 deletions
|
@ -996,13 +996,7 @@ namespace MWWorld
|
||||||
if (!object.isEmpty ())
|
if (!object.isEmpty ())
|
||||||
{
|
{
|
||||||
Ogre::SceneNode* node = object.getRefData().getBaseNode();
|
Ogre::SceneNode* node = object.getRefData().getBaseNode();
|
||||||
Ogre::AxisAlignedBox bounds;
|
Ogre::AxisAlignedBox bounds = node->_getWorldAABB();
|
||||||
int i;
|
|
||||||
for (i=0; i<node->numAttachedObjects(); ++i)
|
|
||||||
{
|
|
||||||
Ogre::MovableObject* ob = node->getAttachedObject(i);
|
|
||||||
bounds.merge(ob->getWorldBoundingBox());
|
|
||||||
}
|
|
||||||
if (bounds.isFinite())
|
if (bounds.isFinite())
|
||||||
{
|
{
|
||||||
Vector4 screenCoords = mRendering->boundingBoxToScreen(bounds);
|
Vector4 screenCoords = mRendering->boundingBoxToScreen(bounds);
|
||||||
|
|
Loading…
Reference in a new issue