MS DXC on Windows (at least IDxcUtils::BuildArguments) does not support forward slashes in UNC paths. This change feeds it native format with backslashes.
This makes it possible to build Linux and Windows binaries from a single source on a network share.
This is a regression introduced in 7525b54f (merged via df5a8a89), GLM_FORCE_DEFAULT_ALIGNED_GENTYPES causes visible screen corruption, particularly in the smoke from chimneys or vehicles.
It causes the game to crash on launch while attempting to use SIMD
instructions when compiled with GCC or Clang.
Since it's known to work on MSVC and was enabled due to performance
improvement, leave it enabled there.
Simplified lamp logic by reducing unnecessary brackets, `if` statements, ternary operators and boolean comparisons.
Added new lamps:
- `i-gear1` - 1st gear in the gearbox is active
- `i-gear2` - 2nd gear in the gearbox is active
- `i-hydrolockup` - The gearbox is locking the engine and wheels together
Additionally, fixed motor overload and differential relay lights not turning off when the battery is turned off.
In TSegment there were two different formulas for a derivative. Most places called GetFirstDerivative() that used the direct formula from the curve points. However RaPositionGet() had its own calculation based on pre-computed cubic polynomial coefficients. This latter method is faster and simpler, so change GetFirstDerivative() to use it and change RaPositionGet() to just call GetFirstDerivative().
TSegment::GetTFromS() is a significant hotspot in the non-rendering part of the state_manager update (about 13%). This change introduces a FastGetTFromS() version that interpolates from precomputed values instead of doing the whole calculation on every call. Computing position from track distance is now done in constant time. This reduces the contribution to about 0.3%.
Embedded CPython builds sys.path from PYTHONHOME only. Unlike the python
CLI it does not prepend the working directory, and unlike Windows'
getpathp.c it does not add the executable's directory either, so on POSIX
"from scripts import ..." (the asset-side scripts package used by texture
and screen renderers) fails to import.
Insert "." at the front of sys.path after interpreter init, matching how
the engine resolves every other asset (relative to CWD). Idempotent and
harmless on Windows.
Now that ref/openal ships a current alext.h, include it and use the real
LPALC*SOFT / ALCEVENTPROCTYPESOFT typedefs instead of hand-rolled function
pointer types and #define'd ALC_* tokens. The event callback is marked
ALC_APIENTRY + noexcept to match ALCEVENTPROCTYPESOFT. No behaviour change.
Replace the ~1 Hz poll (which relied on alcGetString(DEFAULT_ALL_DEVICES),
whose value OpenAL caches and does not refresh on re-plug) with an
alcEventCallbackSOFT handler for DEFAULT_DEVICE_CHANGED / DEVICE_REMOVED. The
callback (possibly off-thread) just flags the change; update() reopens playback
on the new default on the main thread. Now both unplugging and re-plugging the
output are followed. Falls back to the ALC_CONNECTED poll when system_events is
unavailable, and only chases the default when no device is pinned.
Refresh ref/openal with current OpenAL Soft headers: adds alext.h (ALC_SOFT
extensions incl. reopen_device / system_events, ALC_CONNECTED, the EFX
presets) and efx*.h, and updates al.h/alc.h. Enables the audio device-change
following to build against native tokens instead of local fallbacks.
ALC_MAJOR/MINOR_VERSION only report the OpenAL API spec level (always 1.1),
which is misleading. Additionally log alGetString(AL_VERSION) (e.g.
"1.1 ALSOFT 1.24.2") once a context is current, and relabel the spec line.
OpenAL does not re-route on its own, so unplugging the active output device
(e.g. headphones) mid-game left the sim silent until restart. Poll ALC_CONNECTED
(ALC_EXT_disconnect) at ~1 Hz and, when the device is lost, reopen playback on
the current default output via alcReopenDeviceSOFT, preserving the context and
all sources. Tokens are declared locally since the bundled AL headers ship no
alext.h; the entry point is resolved at runtime, so this is a no-op (with a log
warning) on OpenAL Soft builds too old to provide ALC_SOFT_reopen_device.
Enabling GLM_FORCE_DEFAULT_ALIGNED_GENTYPES makes glm::vec3 16 bytes (padded),
but the listener orientation was passed to alListenerfv as
reinterpret_cast<ALfloat const *>(glm::vec3[2]). With the padding the six
floats OpenAL reads are at.x, at.y, at.z, PAD, up.x, up.y - the 'up' vector is
taken from padding garbage, corrupting the listener basis (right = at x up) and
swapping left/right of every positional sound.
Build the 6 floats explicitly instead of reinterpreting a padded vec3 array.