18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 21:07:06 +01:00
Commit Graph

1 Commits

Author SHA1 Message Date
jerrrrycho 3bd0193d8d feat(vehicle): lowpoly driver figure follows the direction in single desk vehicles (GE#535) (#530)
In a vehicle with one desk for both directions (401Da, SM31, TEM2) the
AI changes the cab to drive the other way, so from outside its lowpoly
figure turns round (mechanik2). The player usually stays in the cab and
only moves the reverser, so the figure kept facing forward.

When the player drives such a vehicle, the figure now follows the
selected direction of travel (DirAbsolute): reverser backwards shows
mechanik2, forwards mechanik1. With no direction selected it is the
figure of the occupied cab, as before. The AI is unchanged.

A vehicle counts as single desk when its .mmd has jointcabs:, cab1model:
and cab2model: name the same model and driver1sitpos: and driver2sitpos:
(or driverNpos: without a sitpos) are the same spot within 1 cm. Two
desks in one cab (SM42, SP42: mirrored seats) and vehicles with two cabs
don't match, so they are unchanged. No data change is needed.

eu07.ini driverfigure.followsdirection (yes by default); "no" keeps the
figure of the occupied cab, as before.

The decision is in vehicle/driverfigure.h, tested in
tests/unit/test_driver_figure.cpp.
2026-11-27 23:51:10 +01:00