build 181016. freespot color override, vehicle start jolt sound, switch trackbed generation fixes

This commit is contained in:
tmj-fstate
2018-10-16 20:11:23 +02:00
parent 4474117878
commit 841e18f170
11 changed files with 155 additions and 57 deletions

View File

@@ -3074,7 +3074,7 @@ path_table::InitTracks() {
auto const trackname { track->name() };
switch (track->eType) {
// TODO: re-enable
case tt_Table: {
// obrotnicę też łączymy na starcie z innymi torami
// szukamy modelu o tej samej nazwie
@@ -3169,10 +3169,6 @@ path_table::InitTracks() {
break;
}
}
if( Global.CreateSwitchTrackbeds ) {
// when autogenerating trackbeds, try to restore trackbeds for tracks neighbouring double slips
track->copy_adjacent_trackbed_material();
}
break;
}
case tt_Switch: {
@@ -3180,10 +3176,6 @@ path_table::InitTracks() {
track->AssignForcedEvents(
simulation::Events.FindEvent( trackname + ":forced+" ),
simulation::Events.FindEvent( trackname + ":forced-" ) );
if( Global.CreateSwitchTrackbeds ) {
// when autogenerating trackbeds, try to restore trackbeds for tracks neighbouring double slips
track->copy_adjacent_trackbed_material();
}
break;
}
default: {
@@ -3199,6 +3191,25 @@ path_table::InitTracks() {
}
}
if( Global.CreateSwitchTrackbeds ) {
// do this after all connections are established, otherwise missing switch connections
// may prevent us from obtaining texture data for basic track from 'across' a switch
for( auto *track : m_items ) {
// try to assign missing trackbed materials for switches and tracks neighbouring switches
switch( track->eType ) {
case tt_Normal:
case tt_Switch: {
track->copy_adjacent_trackbed_material();
break;
}
default: {
break;
}
} // switch
}
}
auto *isolated = TIsolated::Root();
while( isolated ) {