Non-working brake light is caused by this line in Gl_Car::exterior_model (),
Code:
joeexterior.AdditiveTexture(settings.GetFullDataPath("cars/" + m_car_file + "/brake.joe"), 1);
joeexterior.AdditiveTexture() is actually trying to load the texture from cars/<carname>/brake.png". (as a side note, there is a slight re-direction in AdditiveTexture() which converts the file extention from .joe to .png. This had me confused for quite a while)
Anyway, in the car data files, brake.png is actually at cars/<carname>/
textures/brake.png. So the above line should be changed to
Code:
joeexterior.AdditiveTexture(settings.GetFullDataPath("cars/" + m_car_file + "/textures/brake.joe"), 1);
After this change, the brake light comes on when I press brake. However, when I use the handbrake, the brake light stays on even I release the handbrake button. This seems to be another bug.
There are some other problems with this block of codes in Gl_Car::exterior_model (),
Code:
joeglass.Load(settings.GetFullDataPath("cars/" + m_car_file + "/glass.joe"));
joeglass.AdditiveTexture(settings.GetFullDataPath("cars/" + m_car_file + "/brake-glass.joe"), 1);
joeglass.Load(settings.GetFullDataPath("cars/" + m_car_file + "/glass.joe"));
joeglass.AdditiveTexture(settings.GetFullDataPath("cars/" + m_car_file + "/brake-glass.joe"), 1);
Seems to me the 2 lines are repeated. Also, what is brake-glass.joe? Is it different from brake.joe?