1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00

Merge branch 'hit_target_object' into 'master'

Unbreak targetted spell on objects (#5811)

See merge request OpenMW/openmw!569
This commit is contained in:
Andrei Kortunov 2021-01-28 14:09:45 +00:00
commit 5382d38b9b

View File

@ -55,7 +55,9 @@ namespace MWPhysics
} }
default: 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; break;
} }
} }