1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 19:53:53 +00:00

Remove a brainfart from precise projectile handling: all non-actor

non-projectile objects were treated as ground.
This commit is contained in:
fredzio 2021-01-27 07:15:09 +01:00
parent f917037ead
commit 64475ebedb

View file

@ -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;
}
}