leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
275 stars 52 forks source link

Panel.animated bug #570

Closed ManuelMejias closed 3 years ago

ManuelMejias commented 3 years ago

Description

Long time ago, i was using Panel.animated to avoid create a tiny exterior cab that means on the first car (1.animated) is using a upper folder alias as this one as also the last car.

[Include] ..//panel.animated position = 0,0,-0.12

My surprise installing 1.7.2.3, this error (rotate 180 degrees) happen on exterior on the first car and interior panel.animated , but for some strange reason, the last car is using the same method but it's correct.

Reproduction

Only Panel.animated

Captura de pantalla (7) Captura de pantalla (8)

Route & Train https://drive.google.com/file/d/1Kd-_r8G7y5hQiTGYlf3mySiv3dyUafff/view?usp=sharing

Logs

21:56:47 Using openGL 1.2 (old) renderer 21:56:47 Initialising game window of size 960 x 600 21:56:48 Game window initialised successfully. 21:56:48 Renderer initialised successfully. 21:56:48 C:\Users\Manuel Mejias\Documents\OpenBVE\Railway : Railway folder found. 21:56:48 INFO: 1 Route loading plugins available. 21:56:48 INFO: 6 Object loading plugins available. 21:56:48 INFO: 1 Sound loading plugins available. 21:56:48 Loading route file: C:\Users\Manuel Mejias\Documents\OpenBVE\Railway\Route\Metro de Caracas Línea 1\Propatria - La Hoyada.csv 21:56:48 INFO: Route file hash FC30D7CF01AA905696FE7F2B53C07BD09D87D7838D3FA6B47D5562FF1B706075 21:56:48 Route file format is: CSV 21:56:49 INFO: Using the Japanese compatibility signal set. 21:56:49 The text encoding of the $Include file C:\Users\Manuel Mejias\Documents\OpenBVE\Railway\Route\Metro de Caracas Línea 1\AguaSalud.include does not match that of the base routefile. 21:56:49 Unrecognised command developerid encountered in the Route namespace at line 3, column 1 in file C:\Users\Manuel Mejias\Documents\OpenBVE\Railway\Route\Metro de Caracas Línea 1\Propatria - La Hoyada.csv 21:56:56 Route file loaded successfully. 21:56:56 Loading AI train: C:\Users\Manuel Mejias\Documents\OpenBVE\Train\CAMETRO-83 Series 10000 21:56:57 Loading sound.cfg file: C:\Users\Manuel Mejias\Documents\OpenBVE\Train\CAMETRO-83 Series 10000\sound.cfg 21:57:01 Loading player train: C:\Users\Manuel Mejias\Documents\OpenBVE\Train\CAMETRO-83 Series 10000 21:57:01 Loading sound.cfg file: C:\Users\Manuel Mejias\Documents\OpenBVE\Train\CAMETRO-83 Series 10000\sound.cfg 21:57:04 Loading train panel: C:\Users\Manuel Mejias\Documents\OpenBVE\Train\CAMETRO-83 Series 10000\panel.animated 21:57:04 Train panel loaded sucessfully. 21:57:04 Loading train plugin: C:\Users\Manuel Mejias\Documents\OpenBVE\Train\CAMETRO-83 Series 10000_01.dll 21:57:04 Train plugin loaded successfully.

Related information

leezer3 commented 3 years ago

That was a nasty little rabbit hole....

A relatively recent addition (and not me for once!) was the caching of object meshes, so that they're not loaded from disk each time they were included. This is great, but as a consequence, we need to deliberately clone said mesh before applying a destructive transform, which had been missed for objects included in this way.

The panel was actually a red herring, which I spent far too long chasing :)

Try this build: https://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2021-01-06.zip