Merge branch 'hit_target_object' into 'master'

Unbreak targetted spell on objects (#5811)

See merge request OpenMW/openmw!569
pull/3044/head
Andrei Kortunov 4 years ago
commit 5382d38b9b

@ -55,7 +55,9 @@ namespace MWPhysics
}
default:
{
mProjectile->hit(MWWorld::Ptr(), m_hitPointWorld, m_hitNormalWorld);
auto* target = static_cast<PtrHolder*>(result.m_hitCollisionObject->getUserPointer());
auto ptr = target ? target->getPtr() : MWWorld::Ptr();
mProjectile->hit(ptr, m_hitPointWorld, m_hitNormalWorld);
break;
}
}

Loading…
Cancel
Save