Don't raycast driveable objects that are not enabled

This commit is contained in:
Benau 2017-11-05 01:32:41 +08:00
parent 8ba0fd3569
commit 69c86930e8

View File

@ -184,6 +184,11 @@ void TrackObjectManager::castRay(const btVector3 &from,
} }
for (const TrackObject* curr : m_driveable_objects) for (const TrackObject* curr : m_driveable_objects)
{ {
if (!curr->isEnabled())
{
// For example jumping pad in cocoa temple
continue;
}
btVector3 new_hit_point; btVector3 new_hit_point;
const Material *new_material; const Material *new_material;
btVector3 new_normal; btVector3 new_normal;