Core/Collision: Solve collision issues with non spawned GOs
This commit is contained in:
@@ -140,6 +140,7 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn
|
||||
}
|
||||
#endif
|
||||
|
||||
owner = &go;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -161,7 +162,7 @@ GameObjectModel* GameObjectModel::Create(const GameObject& go)
|
||||
|
||||
bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask) const
|
||||
{
|
||||
if (!(phasemask & ph_mask))
|
||||
if (!(phasemask & ph_mask) || !owner->isSpawned())
|
||||
return false;
|
||||
|
||||
float time = ray.intersectionTime(iBound);
|
||||
|
||||
Reference in New Issue
Block a user