1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-09 20:32:43 +01:00
Commit Graph

1813 Commits

Author SHA1 Message Date
Anonymous Maarten
cdef8b935e ci: echo APPVEYOR_REPO_COMMIT and COMMIT_HASH + do not exit on mismatch 2018-08-03 19:39:08 +01:00
Filip Gawin
24b47a53f3 Remove unwanted memory leak in script 2018-08-02 21:39:36 +01:00
Paul Kocialkowski
17b6c13a6a rwgame: Adapt the friction slip based on handling data to ease steering
A constant friction slip for all vehicles does not seem to work very
well and most are rather hard to steer with. This introduces a somewhat
empirical formula to get a rather sane friction slip value based on
handling data, where coefficients are used in a way compatible with the
required friction slip value for most vehicles.

This is by far not a perfect approach and the steering on some vehicles
still feels out of line with the realistic expected behaviour, but most
remain fairly drivable.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
e3e8b3acb9 rwengine: Reduce vehicle roll influence to avoid easily flipping wheels
The current roll influence value makes it much too easy to flip vehicles
upside down. More generally, the vehicles tend to not stick to the ground
enough as they are too easily moved around when hit with another vehicle.

Reduce the roll influence value for vehicles to make them stick more to
the ground.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
20ac5b2a39 rwengine: Slow down engine force when the vehicle is braking
This introduces a linear reduction of the engine force when braking is
applied. The division factor increases with the steering angle to
max steering angle ratio, reducing the engine force by a factor of
up to 1.25.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
77b3df037e rwengine: Adapt the nominal engine force for our physics
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>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
dce3b9af3a rwengine: Increase the engine force when starting up
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>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
3ae98dd93a rwengine: Increase the engine force based on the mass
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>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
6c66f61519 rwengine: Implement actual braking when the vehicle is going forward
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>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
094513681b rwengine: Cap maxmimum velocity to the adapted maximum from handling
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>
2018-08-02 21:37:43 +02:00
Paul Kocialkowski
ec49fe2b27 rwgame: Add more interesting vehicles to DebugStates
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:36 +02:00
Filip Gawin
f62a0d2b47 cmake: add -Wold-style-cast warning check to CXX sources (thx @madebr) 2018-07-29 22:21:01 +02:00
Filip Gawin
d95d05e291 Remove old style cast 2018-07-29 22:21:01 +02:00
Filip Gawin
844d1f89b3 Quick Fix filename -> filePath
When I was working on resampling, pull with paths was merged. It's funny how macro hides the problem. It shouldn't compile.
2018-07-29 18:36:26 +01:00
Daniel Evans
ac7ab38360
Merge pull request #546 from ShFil119/fix_test_activities
Fix data test `test_activities`
2018-07-28 11:12:31 +01:00
Daniel Evans
1586a90401
Merge pull request #547 from ShFil119/safe_convertion
Safer convertion strings to numbers
2018-07-26 17:57:08 +01:00
Filip Gawin
b2c2075be7 cast_to_float 2018-07-26 00:10:17 +02:00
Filip Gawin
da7e54b64a Rename bit_cast.hpp to casts.hpp and add cast_to_int 2018-07-26 00:09:58 +02:00
Filip Gawin
cfb0016e46 Add timescale debug info 2018-07-24 23:23:40 +01:00
Daniel Evans
3add481e32
Merge pull request #536 from ShFil119/resampler
Usage of resampler for sounds
2018-07-23 17:44:53 +01:00
Daniel Evans
2c7d27dd5b
Merge pull request #543 from ShFil119/final
Mark classes as final
2018-07-23 13:10:11 +01:00
Filip Gawin
7fafd3728e Usage of resampler for sounds
Commit fixes #458.

It also loosens the connection
between decoder and player (openAL).

It allows to easier replace
player if there's need.
2018-07-22 20:15:14 +02:00
Daniel Evans
2f8ae7fb0b
Merge pull request #522 from ShFil119/prepare_sdt_loader_for_ffmpeg
Prepare sdt loader for ffmpeg
2018-07-20 21:24:11 +01:00
Daniel Evans
a620de0807
Merge pull request #537 from mole99/basic-traffic
[Ready] Basic traffic
2018-07-20 13:40:00 +01:00
mole99
5f2fe96167 Implement basic traffic
This includes spawning vehicles on the road and rudimentary traffic control with changing lanes and braking in front of characters
2018-07-19 21:41:13 +02:00
NFS_MONSTR
c4ad3d9846 Bump cmake version to 3.8 #544 2018-07-19 14:42:27 +01:00
Filip Gawin
9bc606d96d Fix data test test_activities
Actually GoTo ignores z axis (up),
It looks position which is targetted by
character is some kind of hole or slope.
2018-07-13 18:52:10 +02:00
Filip Gawin
247a4c034d Use LoaderSDT to feed ffmpeg using sfx sounds
Function loadSound returns
AVFormatContext with custom AVIOContext.
2018-07-11 21:43:38 +02:00
Filip Gawin
495c831972 Mark classes as final
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
2018-07-07 22:55:10 +02:00
Daniel Evans
83ee9ef568
Merge pull request #526 from madebr/rwlib_changes
Rwlib changes
2018-07-05 22:05:56 +01:00
Daniel Evans
9c22dbbc91
Merge pull request #523 from ShFil119/default_member_initializer
[Ready]Usage of default member initializer
2018-07-05 20:38:55 +01:00
Daniel Evans
caa1e1eee0
Merge pull request #508 from madebr/conan
Add support for Conan
2018-07-03 23:14:46 +01:00
Filip Gawin
76c15c2a82 Usage of default member initializer 2018-07-03 20:08:03 +02:00
Anonymous Maarten
8aee672466 rwlib: refactor FileIndex
- 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
2018-06-30 04:03:20 +02:00
Anonymous Maarten
062115f6bd rwgame+rwengine: get background from index + pass as rwfs::path 2018-06-30 04:03:20 +02:00
Anonymous Maarten
4f60dfad43 rwlib: bit_case is a header, not a source file 2018-06-30 04:03:20 +02:00
Anonymous Maarten
36149cf38e rwlib: rw/defines.hpp -> rw/debug.hpp 2018-06-30 04:03:20 +02:00
Daniel Evans
0b8407b618
Merge pull request #534 from ShFil119/icon
Add an SDL window icon to the executable
2018-06-30 01:06:12 +01:00
Filip Gawin
93c55057c8 Add an SDL window icon to the executable, thx @vflyson 2018-06-29 23:15:23 +02:00
Daniel Evans
4c357ad618
Merge pull request #493 from husho/pacman
Big'N'Veiny pickups
2018-06-29 21:15:17 +01:00
Jannik Vogel
2b59f8b210
Merge pull request #533 from christoph-heiss/fix-cutscenes-macos
Fix cutscene only showing a grey screen on macOS.
2018-06-26 22:09:59 +02:00
Christoph Heiss
359d61e544
cmake: Fix linking failure when using the C++17 or C++TS filesystem library on macOS. 2018-06-26 14:16:10 +02:00
Christoph Heiss
4e38cb1d30
rwengine: Fix cutscenes only showing a grey screen on macOS.
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.
2018-06-26 14:15:08 +02:00
husho
f9fc588d64 Fixed: tests weren't working
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
2018-06-26 03:45:52 +03:00
Daniel Evans
7061813afd
Merge pull request #507 from husho/scmfix
Fix: terminate only mission scripts when starting new mission via debug menu
2018-06-26 00:43:19 +01:00
husho
363840396a Implemented: Big'N'Veiny pickups 2018-06-26 02:39:24 +03:00
Daniel Evans
7d7400308c
Merge pull request #490 from husho/garages_continuation
[Ready] Garages continuation
2018-06-26 00:23:38 +01:00
Daniel Evans
146b42d510
Merge pull request #525 from dracc/349-fix
Fix #349 "Smooth vehicle steering"
2018-06-25 23:54:45 +01:00
husho
92d2a614b7 Garages continuation 2018-06-24 02:43:24 +03:00
Lucas Eriksson
15c7f7299c 349-fix 2018-06-22 12:37:46 +02:00