Fix some corruption in server only stk
This commit is contained in:
parent
66626e4ea8
commit
821a00c039
@ -303,7 +303,6 @@ core::recti IrrDriver::getSplitscreenWindow(int WindowNum)
|
|||||||
|
|
||||||
const int x_grid_Position = WindowNum % cols;
|
const int x_grid_Position = WindowNum % cols;
|
||||||
const int y_grid_Position = int(floor((WindowNum) / cols));
|
const int y_grid_Position = int(floor((WindowNum) / cols));
|
||||||
int wid = (int)irr_driver->getActualScreenSize().Width;
|
|
||||||
|
|
||||||
//To prevent the viewport going over the right side, we use std::min to ensure the right corners are never larger than the total width
|
//To prevent the viewport going over the right side, we use std::min to ensure the right corners are never larger than the total width
|
||||||
return core::recti(
|
return core::recti(
|
||||||
@ -715,8 +714,8 @@ void IrrDriver::initDevice()
|
|||||||
// set cursor visible by default (what's the default is not too clearly documented,
|
// set cursor visible by default (what's the default is not too clearly documented,
|
||||||
// so let's decide ourselves...)
|
// so let's decide ourselves...)
|
||||||
m_device->getCursorControl()->setVisible(true);
|
m_device->getCursorControl()->setVisible(true);
|
||||||
m_pointer_shown = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
m_pointer_shown = true;
|
||||||
} // initDevice
|
} // initDevice
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -786,16 +785,19 @@ void IrrDriver::getOpenGLData(std::string *vendor, std::string *renderer,
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void IrrDriver::showPointer()
|
void IrrDriver::showPointer()
|
||||||
{
|
{
|
||||||
|
#ifndef SERVER_ONLY
|
||||||
if (!m_pointer_shown)
|
if (!m_pointer_shown)
|
||||||
{
|
{
|
||||||
m_pointer_shown = true;
|
m_pointer_shown = true;
|
||||||
this->getDevice()->getCursorControl()->setVisible(true);
|
this->getDevice()->getCursorControl()->setVisible(true);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} // showPointer
|
} // showPointer
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void IrrDriver::hidePointer()
|
void IrrDriver::hidePointer()
|
||||||
{
|
{
|
||||||
|
#ifndef SERVER_ONLY
|
||||||
// always visible in artist debug mode, to be able to use the context menu
|
// always visible in artist debug mode, to be able to use the context menu
|
||||||
if (UserConfigParams::m_artist_debug_mode)
|
if (UserConfigParams::m_artist_debug_mode)
|
||||||
{
|
{
|
||||||
@ -808,6 +810,7 @@ void IrrDriver::hidePointer()
|
|||||||
m_pointer_shown = false;
|
m_pointer_shown = false;
|
||||||
this->getDevice()->getCursorControl()->setVisible(false);
|
this->getDevice()->getCursorControl()->setVisible(false);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} // hidePointer
|
} // hidePointer
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -1185,11 +1185,7 @@ bool Track::loadMainTrack(const XMLNode &root)
|
|||||||
scene::CBatchingMesh *merged_mesh = new scene::CBatchingMesh();
|
scene::CBatchingMesh *merged_mesh = new scene::CBatchingMesh();
|
||||||
merged_mesh->addMesh(mesh);
|
merged_mesh->addMesh(mesh);
|
||||||
merged_mesh->finalize();
|
merged_mesh->finalize();
|
||||||
#ifndef SERVER_ONLY
|
|
||||||
tangent_mesh = merged_mesh;
|
tangent_mesh = merged_mesh;
|
||||||
#else
|
|
||||||
tangent_mesh = merged_mesh;
|
|
||||||
#endif
|
|
||||||
// The reference count of the mesh is 1, since it is in irrlicht's
|
// The reference count of the mesh is 1, since it is in irrlicht's
|
||||||
// cache. So we only have to remove it from the cache.
|
// cache. So we only have to remove it from the cache.
|
||||||
irr_driver->removeMeshFromCache(mesh);
|
irr_driver->removeMeshFromCache(mesh);
|
||||||
@ -1198,9 +1194,7 @@ bool Track::loadMainTrack(const XMLNode &root)
|
|||||||
{
|
{
|
||||||
// SPM does the combine for you
|
// SPM does the combine for you
|
||||||
tangent_mesh = mesh;
|
tangent_mesh = mesh;
|
||||||
#ifndef SERVER_ONLY
|
|
||||||
tangent_mesh->grab();
|
tangent_mesh->grab();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// The merged mesh is grabbed by the octtree, so we don't need
|
// The merged mesh is grabbed by the octtree, so we don't need
|
||||||
// to keep a reference to it.
|
// to keep a reference to it.
|
||||||
|
Loading…
Reference in New Issue
Block a user