mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 03:45:35 +00:00
When doing a ray cast to the next projectile position, ignore collisions
that occurs with the projectile own collision object. Otherwise a magic bolt can explode "spontaneously".
This commit is contained in:
parent
884b434ee0
commit
259d522800
1 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,10 @@ namespace MWPhysics
|
|||
{
|
||||
if (rayResult.m_collisionObject == mMe)
|
||||
return 1.f;
|
||||
|
||||
if (mProjectile && rayResult.m_collisionObject == mProjectile->getCollisionObject())
|
||||
return 1.f;
|
||||
|
||||
if (!mTargets.empty())
|
||||
{
|
||||
if ((std::find(mTargets.begin(), mTargets.end(), rayResult.m_collisionObject) == mTargets.end()))
|
||||
|
|
Loading…
Reference in a new issue