Moved m_track out of World into a static m_track in Track. Makes

world smaller and removes a few dependencies on World.
This commit is contained in:
hiker
2016-12-13 07:53:33 +11:00
parent 8785ddf148
commit cd149ab5d7
60 changed files with 264 additions and 231 deletions
+4 -3
View File
@@ -1300,7 +1300,7 @@ void PostProcessing::renderGodRays(scene::ICameraSceneNode * const camnode,
const FrameBuffer &quarter1_fbo,
const FrameBuffer &quarter2_fbo)
{
Track* track = World::getWorld()->getTrack();
Track* track = Track::getCurrentTrack();
glEnable(GL_DEPTH_TEST);
// Grab the sky
@@ -1448,8 +1448,9 @@ FrameBuffer *PostProcessing::render(scene::ICameraSceneNode * const camnode,
}
bool hasgodrays = false;
if (World::getWorld() != NULL)
hasgodrays = World::getWorld()->getTrack()->hasGodRays();
const Track * const track = Track::getCurrentTrack();
if (track)
hasgodrays = track->hasGodRays();
if (isRace && UserConfigParams::m_light_shaft && hasgodrays)
{