Core/Entities: Phasing rewrite

* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
This commit is contained in:
Shauren
2018-01-28 11:37:20 +01:00
parent 1e62b53c66
commit 91be2332e2
80 changed files with 1802 additions and 885 deletions

View File

@@ -152,12 +152,12 @@ GameObjectModel* GameObjectModel::Create(std::unique_ptr<GameObjectModelOwnerBas
return mdl;
}
bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, std::set<uint32> const& phases) const
bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, PhaseShift const& phaseShift) const
{
if (!isCollisionEnabled() || !owner->IsSpawned())
return false;
if (!owner->IsInPhase(phases))
if (!owner->IsInPhase(phaseShift))
return false;
float time = ray.intersectionTime(iBound);