Fix server-only compilation.

This commit is contained in:
hiker 2016-12-06 18:10:31 +11:00
parent 746bac00ce
commit fdfb56ddf8
3 changed files with 7 additions and 4 deletions

View File

@ -254,6 +254,7 @@ void LODNode::OnRegisterSceneNode()
m_previous_visibility = (shown ? WAS_SHOWN : WAS_HIDDEN);
m_last_tick = now;
#ifndef SERVER_ONLY
if (!CVS->isGLSL())
{
for (core::list<ISceneNode*>::Iterator it = Children.begin();
@ -262,7 +263,7 @@ void LODNode::OnRegisterSceneNode()
(*it)->updateAbsolutePosition();
}
}
#endif
scene::ISceneNode::OnRegisterSceneNode();
}

View File

@ -73,6 +73,7 @@ LocalPlayerController::LocalPlayerController(AbstractKart *kart,
// Attach Particle System
Track *track = World::getWorld()->getTrack();
#ifndef SERVER_ONLY
if (UserConfigParams::m_weather_effects &&
track->getSkyParticles() != NULL)
{
@ -88,7 +89,7 @@ LocalPlayerController::LocalPlayerController(AbstractKart *kart,
// of the heightmap being calculated and kept in memory
m_sky_particles_emitter->addHeightMapAffector(track);
}
#endif
} // LocalPlayerController
//-----------------------------------------------------------------------------
@ -191,6 +192,7 @@ void LocalPlayerController::update(float dt)
// look backward when the player requests or
// if automatic reverse camera is active
#ifndef SERVER_ONLY
Camera *camera = Camera::getCamera(m_camera_index);
if (camera->getType() != Camera::CM_TYPE_END)
{
@ -217,7 +219,7 @@ void LocalPlayerController::update(float dt)
}
}
}
#endif
if (m_kart->getKartAnimation() && m_sound_schedule == false &&
m_kart->getAttachment()->getType() != Attachment::ATTACH_TINYTUX)
{

View File

@ -52,11 +52,11 @@ KartGFX::KartGFX(const AbstractKart *kart)
scene::ISceneNode *node = m_kart->getNode();
// Create nitro light
core::vector3df location(0.0f, 0.5f, -0.5f*length - 0.05f);
#ifndef SERVER_ONLY
m_nitro_light = irr_driver->addLight(location, /*force*/ 0.4f,
/*radius*/CVS->isGLSL() ? 5.0f : 1.0f,
0.0f, 0.4f, 1.0f,
false, node);
#ifndef SERVER_ONLY
m_nitro_light->setVisible(false);
#ifdef DEBUG
m_nitro_light->setName( ("nitro emitter (" + m_kart->getIdent()