mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
Add sleepermodel optional parameter for tracks
This commit is contained in:
@@ -582,6 +582,15 @@ bool global_settings::ConfigParseSimulation(cParser& Parser, const std::string&
|
||||
return true;
|
||||
}
|
||||
|
||||
if (token == "sleeperdistance")
|
||||
{
|
||||
float sleeperdistance = 0.f;
|
||||
ParseOne(Parser, sleeperdistance);
|
||||
// negative values disable the cap; we clamp at 0 so 0 means "do not render sleepers"
|
||||
SleeperDistance = std::max(0.f, sleeperdistance);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (token == "createswitchtrackbeds")
|
||||
{
|
||||
ParseOne(Parser, CreateSwitchTrackbeds);
|
||||
@@ -1567,6 +1576,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
|
||||
export_as_text( Output, "gfx.smoke.fidelity", SmokeFidelity );
|
||||
export_as_text( Output, "smoothtraction", bSmoothTraction );
|
||||
export_as_text( Output, "splinefidelity", SplineFidelity );
|
||||
export_as_text( Output, "sleeperdistance", SleeperDistance );
|
||||
export_as_text( Output, "rendercab", render_cab );
|
||||
export_as_text( Output, "createswitchtrackbeds", CreateSwitchTrackbeds );
|
||||
export_as_text( Output, "gfx.resource.sweep", ResourceSweep );
|
||||
|
||||
@@ -165,6 +165,7 @@ struct global_settings {
|
||||
GLint iMaxCabTextureSize{ 4096 }; // largest allowed texture in vehicle cab
|
||||
int iMultisampling{ 2 }; // tryb antyaliasingu: 0=brak,1=2px,2=4px,3=8px,4=16px
|
||||
float SplineFidelity{ 1.f }; // determines segment size during conversion of splines to geometry
|
||||
float SleeperDistance{ 250.f }; // max distance (in meters) at which per-track sleeper models are still drawn; 0 disables sleeper rendering entirely
|
||||
bool Smoke{ true }; // toggles smoke simulation and visualization
|
||||
float SmokeFidelity{ 1.f }; // determines amount of generated smoke particles
|
||||
bool ResourceSweep{ true }; // gfx resource garbage collection
|
||||
|
||||
Reference in New Issue
Block a user