Possibly should not assume tracks/roads are in \global
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Open Rails |
Triaged
|
Low
|
Unassigned |
Bug Description
In Shapes.cs, this code:
/// <summary>
/// Only one copy of the model is loaded regardless of how many copies are placed in the scene.
/// </summary>
void LoadContent()
{
var sFile = new SFile(FilePath);
var textureFlags = Helpers.
if (File.Exists(
{
var sdFile = new SDFile(FilePath + "d");
if (FilePath != null && FilePath.
}
Is making an assumption that track and road shapes will always be found in \global\shapes. That is not at all correct. After placing any item from Global\shapes via the route editor a subsequent edit can be made in the world file to replace that shape with another and the later can be located anywhere. For example, this world file entry:
TrackObj (
UiD ( 100 )
SectionIdx ( 25164 )
Elevation ( -0.00261799 )
CollideFlags ( 535 )
FileName ( ../../routes/
StaticFlags ( 00200100 )
Position ( 409.975 180.463 389.273 )
QDirection ( -0.00120662 0.387776 -0.000507626 0.921753 )
VDbId ( 4294967294 )
StaticDetailLevel ( 0 )
)
As the shape used is in the route's own \shapes directory everything about the textures are too.
Rather than search the path of the shape file it might be better to search the world file entry for the string "SectionIdx" as that will always mean an entry that KUJU defined as a global shape and will guarantee that anything KUJU did with global shapes can be always be done that way in OR.
summary: |
- Possib le Erroeneous Assumption + Possibly should not assume tracks/roads are in \global |
Changed in or: | |
assignee: | nobody → James Ross (twpol) |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: content graphics |
Changed in or: | |
assignee: | James Ross (twpol) → nobody |
I guess my question is this: does MSTS use snow textures on your modified- to-not- be-global track/roads? (Even when they don't specify as such in the SD file.)
The code was added to fix bug 1159557 where a static shape from the global directory was not getting snow textures, so it appears that even though the SD file didn't say use-snow, MSTS was using snow textures.