16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 02:09:19 +02:00

option to disable cab rendering

This commit is contained in:
milek7
2019-03-19 00:03:03 +01:00
parent 62a3d2f92c
commit d0f4be6616
3 changed files with 7 additions and 0 deletions

View File

@@ -373,6 +373,10 @@ global_settings::ConfigParse(cParser &Parser) {
Parser >> splinefidelity;
SplineFidelity = clamp( splinefidelity, 1.f, 4.f );
}
else if (token == "rendercab") {
Parser.getTokens();
Parser >> render_cab;
}
else if( token == "createswitchtrackbeds" ) {
// podwójna jasność ambient
Parser.getTokens();

View File

@@ -180,6 +180,7 @@ struct global_settings {
bool loading_log = true;
bool dds_upper_origin = false;
bool captureonstart = true;
bool render_cab = true;
std::chrono::duration<float> minframetime {0.0f};

View File

@@ -2280,6 +2280,8 @@ bool opengl_renderer::Render(TDynamicObject *Dynamic)
// rendering kabiny gdy jest oddzielnym modelem i ma byc wyswietlana
bool opengl_renderer::Render_cab(TDynamicObject const *Dynamic, float const Lightlevel, bool const Alpha)
{
if (!Global.render_cab)
return false;
if (Dynamic == nullptr)
{