mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-11 13:25:53 -04:00
Bug #1189 fix by scrawl
This commit is contained in:
parent
f1353dc84f
commit
f36bea03ab
@ -1873,6 +1873,8 @@ namespace MWWorld
|
|||||||
|
|
||||||
bool World::getLOS(const MWWorld::Ptr& npc,const MWWorld::Ptr& targetNpc)
|
bool World::getLOS(const MWWorld::Ptr& npc,const MWWorld::Ptr& targetNpc)
|
||||||
{
|
{
|
||||||
|
if (!targetNpc.getRefData().isEnabled() || !npc.getRefData().isEnabled())
|
||||||
|
return false; // cannot get LOS unless both NPC's are enabled
|
||||||
Ogre::Vector3 halfExt1 = mPhysEngine->getCharacter(npc.getRefData().getHandle())->getHalfExtents();
|
Ogre::Vector3 halfExt1 = mPhysEngine->getCharacter(npc.getRefData().getHandle())->getHalfExtents();
|
||||||
float* pos1 = npc.getRefData().getPosition().pos;
|
float* pos1 = npc.getRefData().getPosition().pos;
|
||||||
Ogre::Vector3 halfExt2 = mPhysEngine->getCharacter(targetNpc.getRefData().getHandle())->getHalfExtents();
|
Ogre::Vector3 halfExt2 = mPhysEngine->getCharacter(targetNpc.getRefData().getHandle())->getHalfExtents();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user