This introduces a coefficient to adapt the nominal engine force to our
physics and ensure that top speed is not reached too fast.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Most vehicles are still slow to start and manoeuvre. For instance, it is
rather hard to precisely park in a parking space. In order to make
vehicles more reactive when starting (either forward or backward), the
engine force is increased at first and progressively decreased to its
nominal force, following the velocity increase up to half the maximum
velocity.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Since heavy vehicles have more inertia, they require more engine force
to be moved sufficiently fast. Without this extra force, many heavy
vehicles are unbearably slow to drive. Reuse the mass coefficient that
was introduced to increase the engine force accordingly.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
This implements proper braking by detecting a brake condition with a
negative throttle and a positive forward velocity. Under this condition,
the engine is stopped and brake is applied. A mass coefficient is
introduced to quantify how heavy a vehicle is, so that more braking can
be applied to heavy vehicles, that have higher inertia.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
A specific coefficient is introduced to adapt the value to the physics
engine, since converting the value from km/h gives an unrealisticly high
maximum speed.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
It lets complier to make extra optimization.
See:
https://gcc.godbolt.org/#compilers:!((compiler:g6,options:'-O2+-Wall++-
xc%2B%2B+-
std%3Dc%2B%2B11',sourcez:MYGwhgzhAECC0G8BQAHArgIxAS2ALiWiOgDdsAnAFzTBFIHtsATaAMwAoBKaAXmgAYA3EgC%2BwpKEgwAQtDzR0WXHESpMOfIWIlGLDt1bYAdrWj0SAU3LlmF4WKQTwUaAGE5C9cvjJFGgsQMzGxcZpbWtvbiOsGs9PTs0gBk0BjcyIEYAHT69o4xLBhg5OyuKcDpWkTAOVz2QAA%3D%3D)),filterAsm:
(commentOnly:!t,directives:!t,intel:!t,labels:!t),version:3
- make FileIndex const correct (std::map::operator[] modifies the std::map)
- use a single map
- keys are paths relative in the game data directory + filenames
(so paths like "data/main.scm" can be found twice in the map)
- normalization of the file paths is done inside FileIndex,
so there shouldn't be any ::tolower's anymore.
- added a normalizer helper function "normalizeFilePath"
- added Documentation
This is caused by different handling of formatted input in the C++
standard library on macOS than on a linux box.
On linux, characters after a number are ignored (such as 'f' in this
case), on macOS this leads to an error on the stream.
Fixed: mission timer
Timer was going crazy due to missing 02d9 opcode, update timer 25 times per second
Fixed: mission timer
Don't beep on every timer update