Skip to content

Conversation

@SteelFill
Copy link
Contributor

Five years ago, PR #63 added support for .ace textures to replace missing .dds textures, so long as the .ace texture had the same name as the .dds texture. As I'm sure many in the community have discovered first hand, this simply does not happen in any current builds of OR. A shape looking for .dds textures will show the default texture even when a suitable .ace is present.

This is because of PR #64, which was supposed to add a warning message to show when a .dds was replaced with a .ace, but instead broke this process because the string formatting was set up incorrectly (used 1-indexing when string format uses 0-indexing). The resulting index out of bounds exception is caught, so no crash happens, but the catch statement for this part of the code causes the default texture to be used and a missing texture error to be added to the log (ie: the same behavior as if neither pull request existed).

Getting on my soapbox for a moment here, I am baffled that, A: nobody noticed the syntax error in #64 before merging it, B: nobody acted on the fact that #63 stopped functioning as intended after #64 was merged, and C: after years of community members reporting frustration with missing textures (that ultimately were because the shape files were looking for .dds and refused to use the .ace of the same name) nobody re-investigated the issue until I got curious enough to check what was going on. This series of mistakes would be much harder now considering the regular updates to the unstable version and the eagle-eyed community noticing when there's even the slightest regression between adjacent unstable builds (as long as there is a discussion going on telling the community what should be happening).

This PR finally fixes that basic mistake, so no more grey track textures unless the user is actually missing the textures they need.

@SteelFill SteelFill added the bug Something isn't working label May 27, 2024
twpol pushed a commit that referenced this pull request May 27, 2024
- Pull request #799 at dfc715e: Consolidated wind simulation
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
- Pull request #882 at b3f83ed: Blueprint/train car operations UI window
- Pull request #891 at 9a1d6b2: Auto save
- Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH
- Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains
- Pull request #900 at c27f32d: DMI updates
- Pull request #903 at 3e390b8: Downloading route content (Github, zip)
- Pull request #912 at cda1d74: New Triple Valve Features Vol. 2
- Pull request #919 at 26cc6a8: Added mouse wheel support for controls which can be moved by pressing t…
- Pull request #922 at abe2e52: Autopilot for timetable mode
- Pull request #943 at fb1f454: Dynamic Brakes Behavior & Display Improvements
- Pull request #945 at 263cbf3: Display tractive force instead of compensated out force
- Pull request #946 at 47fcd1c: Advanced track sounds
- Pull request #947 at 6be9776: Fix .ace Textures Not Being Used as Fallback for Missing .dds
twpol pushed a commit that referenced this pull request May 30, 2024
- Pull request #799 at dfc715e: Consolidated wind simulation
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
- Pull request #882 at b3f83ed: Blueprint/train car operations UI window
- Pull request #891 at 9a1d6b2: Auto save
- Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH
- Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains
- Pull request #900 at c27f32d: DMI updates
- Pull request #903 at 3e390b8: Downloading route content (Github, zip)
- Pull request #912 at cda1d74: New Triple Valve Features Vol. 2
- Pull request #919 at 26cc6a8: Added mouse wheel support for controls which can be moved by pressing t…
- Pull request #922 at abe2e52: Autopilot for timetable mode
- Pull request #943 at fb1f454: Dynamic Brakes Behavior & Display Improvements
- Pull request #945 at 263cbf3: Display tractive force instead of compensated out force
- Pull request #946 at 47fcd1c: Advanced track sounds
- Pull request #947 at 6be9776: Fix .ace Textures Not Being Used as Fallback for Missing .dds
- Pull request #948 at a687981: Fix Cycling Lights
twpol pushed a commit that referenced this pull request May 31, 2024
- Pull request #799 at dfc715e: Consolidated wind simulation
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
- Pull request #882 at b3f83ed: Blueprint/train car operations UI window
- Pull request #891 at 9a1d6b2: Auto save
- Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH
- Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains
- Pull request #900 at c27f32d: DMI updates
- Pull request #903 at 3e390b8: Downloading route content (Github, zip)
- Pull request #912 at cda1d74: New Triple Valve Features Vol. 2
- Pull request #919 at 26cc6a8: Added mouse wheel support for controls which can be moved by pressing t…
- Pull request #922 at abe2e52: Autopilot for timetable mode
- Pull request #943 at fb1f454: Dynamic Brakes Behavior & Display Improvements
- Pull request #945 at f5872fd: Display tractive force instead of compensated out force
- Pull request #946 at 47fcd1c: Advanced track sounds
- Pull request #947 at 6be9776: Fix .ace Textures Not Being Used as Fallback for Missing .dds
- Pull request #948 at a687981: Fix Cycling Lights
@SteelFill SteelFill requested a review from Csantucci June 1, 2024 20:00
@SteelFill
Copy link
Contributor Author

@Csantucci Carlo, technically this is your code so it makes sense for you to review. Just one line changed though.

Copy link
Contributor

@Csantucci Csantucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for having analysed that.

@SteelFill SteelFill merged commit 502cbbe into openrails:master Jun 2, 2024
@SteelFill SteelFill deleted the ace_fallback_fix branch June 2, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants