1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-15 15:02:34 +02:00
Commit Graph

1113 Commits

Author SHA1 Message Date
Daniel Evans
844fdf8d33
Merge pull request #558 from ShFil119/soundRefactor
Implement methods for sfx, and refactor Sound system
2018-08-08 20:21:54 +01:00
Filip Gawin
11bc35c3f2 Implement methods for sfx, and refactor Sound system
SoundBuffer and SoundSource got their own
files.
2018-08-08 02:12:29 +02:00
Daniel Evans
be2816c398
Merge pull request #572 from danhedron/test_update/IPL
Remove data dependency from LoaderIPL tests
2018-08-08 00:34:27 +01:00
Daniel Evans
31f32b2173
Merge pull request #571 from madebr/kerning
Add font-dependent kerning
2018-08-07 23:06:12 +01:00
Daniel Evans
457364eca3
Merge pull request #566 from paulkocialkowski/vehicles
Various vehicle improvements
2018-08-07 23:05:58 +01:00
Paul Kocialkowski
ff9ccd5f07 rwengine: Set the linear velocity to a zero vector when stopped
Vehicles have a tendency to move on their own when they are stopped, due
to their interactions with other surfaces that result in a non-zero
velocity.

Since we have a threshold with the isStopped() method, fix this situation
by setting the linear velocity and wheels rotation (that otherwise also
rotate on their own) to zero vectors.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-07 21:25:30 +02:00
Anonymous Maarten
99dca06dbc rwengine: avoid crash of rwviewer/rwgmae when rendering incomplete color string
The string "~g" would crash rwviewer.
2018-08-07 12:39:59 +02:00
Anonymous Maarten
09026ae8b0 rwengine: allow newline in GameString's 2018-08-07 12:39:05 +02:00
Anonymous Maarten
38fca841e7 rwengine: add font-dependent kerning 2018-08-07 12:39:05 +02:00
Daniel Evans
f95427c136
Merge pull request #540 from ShFil119/remove_FileHandle
Remove unneeded FileHandle (aka shared_ptr)
2018-08-07 00:31:19 +01:00
Daniel Evans
0af9b23fe1 Add stream interface to LoaderIPL and use it in test 2018-08-06 23:37:37 +01:00
Filip Gawin
f3a718611e Convert data of FileContentsInfo to unique_ptr
I've removed copy ctor and copy assign operator.
We use here unique_ptr so copying should not happen.
2018-08-06 23:08:34 +02:00
Daniel Evans
634a3940ac
Merge pull request #570 from danhedron/test_up/IDE
Remove data dependency from LoaderIDE test suite
2018-08-06 21:43:46 +01:00
Filip Gawin
27333efd8c Remove unneed FileHandle (aka shared_ptr) 2018-08-06 22:42:09 +02:00
Daniel Evans
3941dde8d6 Add overload for lexical_cast<T> to select the base of the conversion 2018-08-06 20:45:40 +01:00
Daniel Evans
0743ac9681
Merge pull request #528 from madebr/fonts
Convert utf8 string to GameStrings using current font mapping + add string viewer to rwviewer
2018-08-06 20:25:38 +01:00
Daniel Evans
fc64c5e87e Add more object tests and fix a ped info bug
The car mask ped info member was being loaded as base 10 instead of base 16
2018-08-05 23:55:20 +01:00
Anonymous Maarten
a15413f997 rwlib+rwengine+rwviewer: address feedback comments 2018-08-06 00:16:33 +02:00
Paul Kocialkowski
295cb25cb0 Improve jump by getting inertia from the previous movement
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-05 23:08:51 +01:00
Daniel Evans
3b7bb14de6 Extract object data assertions to functions 2018-08-05 22:22:13 +01:00
Anonymous Maarten
37fcebee40 rwlib+rwengine: add string conversion independent of font 2018-08-05 23:20:58 +02:00
Daniel Evans
19368133b5 Extract IDE loading from file opening
This provides a way to parse IDE contents without a real file.
2018-08-05 21:23:36 +01:00
Filip Gawin
491e5303d0 Replace std::ptr_fun with lambda
It is deprecated in c++11,
and remove in c++17.
2018-08-04 23:16:04 +01:00
Filip Gawin
4baeeb9ae8 Replace raw ptr with unique_ptr in CollisionInstance 2018-08-04 14:22:10 +01:00
Anonymous Maarten
640af372ba rwengine+rwgame: convert utf8 to GameString depending on used font 2018-08-04 01:17:13 +02:00
Anonymous Maarten
12afe81a35 rwengine: spelling fix: 'Alignemnt' 2018-08-04 01:11:47 +02:00
Anonymous Maarten
2ad9667b50 rwengine: add per-font mapping + unicode support + tests 2018-08-04 01:11:47 +02:00
Daniel Evans
74a4398e69
Merge pull request #559 from ShFil119/casting
Remove old style casts
2018-08-03 23:47:00 +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
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
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
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
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
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
4c357ad618
Merge pull request #493 from husho/pacman
Big'N'Veiny pickups
2018-06-29 21:15:17 +01: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
Daniel Evans
10ef3448aa
Merge pull request #517 from NFSMONSTR/implement_some_cheats_2
Implement some cheats and showing cheat activated message
2018-06-21 22:45:34 +01:00
Daniel Evans
9ef401f7c4
Merge pull request #471 from husho/patch-2
Temporary partial fix for duped cars & peds in first mission
2018-06-21 22:33:55 +01:00
Anonymous Maarten
ae5edcf056 rwengine: check whether character is player
Fixes #519

==13884==ERROR: AddressSanitizer: heap-use-after-free on address 0x607000b3d954 at pc 0x0000008ba469 bp 0x7ffd7c8f9ab0 sp 0x7ffd7c8f9aa0
READ of size 4 at 0x607000b3d954 thread T0
    #0 0x8ba468 in PlayerController::isTalkingOnPayphone() const /home/maarten/programming/openrw/rwengine/src/ai/PlayerController.cpp:315
    #1 0xa148eb in CharacterObject::updateMovementAnimation(float) /home/maarten/programming/openrw/rwengine/src/objects/CharacterObject.cpp:128
    #2 0xa185d9 in CharacterObject::updateCharacter(float) /home/maarten/programming/openrw/rwengine/src/objects/CharacterObject.cpp:356
    #3 0xa17735 in CharacterObject::tick(float) /home/maarten/programming/openrw/rwengine/src/objects/CharacterObject.cpp:297
    #4 0x7c7731 in RWGame::tick(float) /home/maarten/programming/openrw/rwgame/RWGame.cpp:541
    #5 0x7c6abb in RWGame::run() /home/maarten/programming/openrw/rwgame/RWGame.cpp:447
    #6 0x793b45 in main /home/maarten/programming/openrw/rwgame/main.cpp:17
    #7 0x7f154c17e18a in __libc_start_main (/lib64/libc.so.6+0x2318a)
    #8 0x793839 in _start (/home/maarten/programming/openrw/build/build/rwgame/rwgame+0x793839)
2018-06-21 03:14:09 +02:00
Jannik Vogel
90a0b3ad97
Merge pull request #349 from drummyfish/master
Make vehicle wheels steer smoothly
2018-06-20 22:50:42 +02:00
husho
1132a4ba3c Fixed: missions debug menu
starting a mission via debug menu terminated non mission scripts
2018-06-19 21:22:44 +03:00
Jannik Vogel
3a052353a7
Merge pull request #492 from husho/patch-3
Fix vehicle damage
2018-06-19 18:36:36 +02:00
NFS_MONSTR
f5f1fb3247 Implement some cheats and cheat activated message 2018-06-18 22:15:31 +03:00
husho
22205aaa28 Fix panic 2018-06-18 16:20:51 +03:00
husho
7f249ecf89 Fix paramedic & vigilante submissions (#491)
Opcodes
0376 opcode "create_random_actor" was unimplemented and did return garbage to the script, and dereferencing nonexistent actor caused crashes
2018-06-18 07:36:27 -05:00
husho
595b671f6d Added missing std:: 2018-06-18 06:53:39 -05:00
husho
f3664def80 Redid opcodes related to player input and cutscenes (#476)
Redid opcodes related to player input and cutscenes
2018-06-18 06:53:09 -05:00
husho
6d04746222 [Ready] Payphones (#498)
Payphones
2018-06-17 23:24:34 -05:00
husho
81781a53ed Various opcodes (#499)
Various opcodes
2018-06-17 23:23:20 -05:00
darkf
d0c07db836
Merge pull request #513 from madebr/ub_characterobject
rwgame: remove undefined behavior in CharacterObjects
2018-06-15 11:05:08 -05:00
Anonymous Maarten
46b94bd1ed rwgame: remove undefined behavior in CharacterObjects
Fixes this warning:
/home/maarten/programming/openrw/rwengine/src/objects/CharacterObject.cpp:202:54: runtime error: downcast of address 0x00000ae11d00 which does not point to an object of type 'PlayerController'
0x00000ae11d00: note: object is of type 'DefaultAIController'
 00 00 00 00  58 91 ca 00 00 00 00 00  e0 2e 90 0b 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'DefaultAIController'
/home/maarten/programming/openrw/rwengine/src/objects/CharacterObject.cpp:202:75: runtime error: member call on address 0x00000ae11d00 which does not point to an object of type 'PlayerController'
0x00000ae11d00: note: object is of type 'DefaultAIController'
 00 00 00 00  58 91 ca 00 00 00 00 00  e0 2e 90 0b 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'DefaultAIController'
/home/maarten/programming/openrw/rwengine/src/ai/PlayerController.hpp:66:16: runtime error: member access within address 0x00000ae11d00 which does not point to an object of type 'PlayerController'
0x00000ae11d00: note: object is of type 'DefaultAIController'
 00 00 00 00  58 91 ca 00 00 00 00 00  e0 2e 90 0b 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'DefaultAIController'
2018-06-15 16:24:23 +02:00
Filip Gawin
625ebdcb90
Fix UB in gamestate 2018-06-14 17:06:08 +02:00
Anonymous Maarten
b6a2b2181d cmake: do not override find modules but wrap them separately 2018-06-14 02:10:54 +02:00
husho
23072a5e99 Implement script timer (#500)
Added script timer
2018-06-12 13:05:50 -05:00
NFSMONSTR
85785b04e0 Don't draw asterisks in subtitles (#510)
Don't draw asterisks in subtitles
2018-06-09 10:23:16 -05:00
Anonymous Maarten
7d18898e2c cmake: only install shared libraries 2018-06-08 18:30:25 +02:00
Anonymous Maarten
e3c0b00453 cmake: use GNUInstallDirs for install paths + install everything (optionally) 2018-06-08 18:30:25 +02:00
darkf
64ecec3650
Merge pull request #502 from husho/fade2
Fade fix part 2
2018-06-08 09:08:21 -05:00
darkf
e0e09ba074
Merge pull request #488 from husho/refactor
Refactor: moved getPlayer to World class
2018-06-08 09:07:45 -05:00
husho
cc81aa1d5b Fix vehicle damage
Damage was only applied if there was an impulse/impact
2018-06-08 08:16:37 +03:00
husho
dc3b3c32d1 Enable blending for fades. Thanks to @NFSMONSTR 2018-06-05 08:28:16 +03:00
husho
e98cb05c47 Fade fix part2 2018-06-04 16:30:05 +03:00
darkf
070f58809e
Merge pull request #470 from husho/patch-1
Fade fix
2018-06-03 18:11:36 -05:00
darkf
62513421f3
Merge pull request #494 from NFSMONSTR/Fix_single_line_help_messages
Fixed one line help messages background too small
2018-06-03 18:10:01 -05:00
darkf
02373968c8
Merge pull request #496 from ShFil119/smallFixes
Remove potential source of bugs
2018-06-03 09:22:56 -05:00
husho
4d28701daa Partial fix for duped cars & peds in first mission 2018-06-03 03:41:28 +03:00
husho
ca576ac3cf Refactor: moved getPlayer to World class 2018-06-03 03:40:59 +03:00
husho
304fb976ad Fade fix 2018-06-02 02:54:00 +03:00
Filip Gawin
4f07af11bb Prevent possibility of reading garbage 2018-06-02 01:33:17 +02:00
Filip Gawin
0eab89eb13 Fix dereference nullptr in CharacterObject 2018-06-02 01:32:06 +02:00
Filip Gawin
0abe8ca211 Fix derefencing nullptr in VehicleObject
Logic error: Called C++ object pointer is null
 1: Assuming 'enable' is not equal to 0 in /home/filip/Projekty/qt/
small/rwengine/src/objects/VehicleObject.cpp:708
 2: Assuming pointer value is null in /home/filip/Projekty/qt/small/
rwengine/src/objects/VehicleObject.cpp:709
 3: Called C++ object pointer is null in /home/filip/Projekty/qt/small/
rwengine/src/objects/VehicleObject.cpp:716
2018-06-02 01:17:13 +02:00
NFS_MONSTR
9cb5e3bd09 Fix one line help messages background 2018-06-01 20:49:55 +03:00
darkf
04e857ba0d
Merge pull request #487 from NFSMONSTR/fix432
Fix #432
2018-05-31 23:13:28 -05:00
Daniel Evans
b7d657b9ab
Merge pull request #449 from husho/pickups
[Ready] Got some pickups working
2018-05-25 12:56:11 +01:00
Daniel Evans
2b096eb228
Merge pull request #480 from husho/garages
[Ready] Garages
2018-05-24 17:35:40 +01:00
Daniel Evans
0e87037397
Merge pull request #486 from husho/morelocateopcodes
Locate opcodes
2018-05-24 13:02:06 +01:00
NFS_MONSTR
5da89a871b Fix #432 2018-05-23 22:45:39 +03:00
husho
09fa9edaca Locate opcodes 2018-05-23 21:27:33 +03:00
husho
d753d8cf20 Fixed warnings 2018-05-23 16:56:07 +03:00
husho
3ad651986c Minor changes 2018-05-23 14:42:50 +03:00
husho
a8f5326c1f Don't update doors every tick 2018-05-23 14:17:39 +03:00
husho
5d27eb33e9 Garages controller and basic functionality 2018-05-23 14:05:13 +03:00
Daniel Evans
de8131924d
Merge pull request #450 from husho/objphy
[Ready] Fixed script objects falling through the ground
2018-05-22 23:35:59 +01:00
Daniel Evans
c226432e88
Merge pull request #474 from NFSMONSTR/fix_loading_zonecylinder_texture
Fixed loading ZoneCylinder texture
2018-05-22 23:21:56 +01:00
husho
5c1dbbd8b6 Added pickups 2018-05-22 23:19:19 +03:00
husho
214095ba02 Improved game loop to support game speed 2018-05-22 22:40:51 +03:00
husho
cf3196c928 Fixed crash on new game, fixed missions not failing
on death/arrest
2018-05-22 01:42:18 +03:00
darkf
17077627fb
Merge pull request #447 from ShFil119/small_impr
[Ready] Perfect forwarding and some forgotten stuff
2018-05-21 17:07:01 -05:00
darkf
a8110de63e
Merge pull request #473 from husho/patch-3
Fixed: mission is not restarting if player is in vehicle
2018-05-21 17:03:58 -05:00
Daniel Evans
d343a1a0bb
Merge pull request #481 from dracc/aldoxtor-363
New opcodes as written by @aldoxtor
2018-05-21 13:43:37 +01:00
Lucas Eriksson
5869a6903a Implemented some various opcodes
As written by @husho in #411.
Continuation of #435.
2018-05-20 15:03:22 +02:00
husho
972eaf2c08 F: mission not restarting if player is in vehicle 2018-05-20 01:41:42 +03:00
husho
1ecba29a62 Clear world on player restart, fixed 0395 opcode 2018-05-19 20:00:23 +03:00
NFS_MONSTR
7d6bc6a22e Minor fixes 2018-05-19 17:47:27 +03:00
NFS_MONSTR
b019d187d6 Fixed loading ZoneCylinder texture 2018-05-19 17:13:47 +03:00
husho
97224fccd0 Attempt to fix physics of script objects 2018-05-18 11:43:57 +03:00
Daniel Evans
b77ca47fd4
Merge pull request #446 from husho/respawn
[Ready] Respawn functionality
2018-05-18 02:35:10 +01:00
Daniel Evans
370a969dac
Merge pull request #437 from dracc/mission-412
[Ready] Improved mission clean up logic and implemented related opcodes
2018-05-18 02:10:13 +01:00
Filip Gawin
09c5d36398 Set ptr to const if possible
Also:
- make args name matching in header
and source file,
- make more ptrs to const ref,
2018-05-16 19:17:13 +02:00
Filip Gawin
4e1948c23c Rearrange passing args to functions/ctors
Kill extra shared_ptr by passing them using const reference.
Use perfect forwarding for strings.
Remove redundant std::move.
2018-05-16 19:17:13 +02:00
Filip Gawin
0c4e38a95b Add missing override 2018-05-16 19:15:44 +02:00
Filip Gawin
1e6a26e3c3 Replace deprecated stdint.h with cstding 2018-05-16 19:15:44 +02:00
Lucas Eriksson
2346e03a60 Improved mission clean up logic and implemented related opcodes 2018-05-15 20:42:46 +02:00
husho
4aa326f747
Forgot 1 opcode 2018-05-15 21:14:18 +03:00
husho
fafd58df6e Added respawn functionality 2018-05-15 21:07:40 +03:00
husho
ea55baf07d Added stats opcodes 2018-05-15 21:03:59 +03:00
Daniel Evans
c6f5b5406b
Merge pull request #448 from husho/vehiclehealth
[Ready] Vehicle health
2018-05-15 13:13:19 +01:00
Daniel Evans
274fe20f17
Merge pull request #438 from dracc/locate-408
[Ready] Implemented some locate opcodes
2018-05-14 23:03:36 +01:00
Daniel Evans
f6932305ee
Merge pull request #455 from NFSMONSTR/454
Fix #454
2018-05-14 22:44:13 +01:00
Daniel Evans
a8cafe7396
Merge pull request #433 from NFSMONSTR/add_transparent_pickups2
Added transparency for pickups
2018-05-14 22:13:05 +01:00
husho
3c41e43a85
Little fix 2018-05-14 18:49:28 +03:00
husho
127c8168b3 Vehicle health 2018-05-14 10:37:33 +03:00
NFS_MONSTR
6c76a130af fix 454 2018-05-13 01:47:03 +03:00
Daniel Evans
9831314162
Merge pull request #436 from dracc/blip-409
Implemented blip opcodes
2018-05-11 10:06:38 +01:00
NFS_MONSTR
45ee3ad0d4 Fixed bugs caused by adding switching glBlendFunc 2018-05-09 23:34:30 +03:00
NFS_MONSTR
a2edb79644 Fixed building 2018-05-09 23:34:25 +03:00
NFS_MONSTR
deafe08f1e little changes 2018-05-09 23:34:01 +03:00
NFS_MONSTR
b8cab132f3 Added enum for blending modes 2018-05-09 23:33:55 +03:00
NFS_MONSTR
cfdcf32159 [WIP]Added transparency for pickups and selecting blend mode 2018-05-09 23:33:35 +03:00
Lucas Eriksson
a7bf0f9ea5 New opcodes as written by @aldoxtor
Updated according to requested changes and comments in #363
2018-05-09 10:48:19 +02:00
darkf
b7fb22f95c
Merge pull request #440 from mole99/buoys
Make buoys float again
2018-05-07 10:43:48 -05:00
Lucas Eriksson
263f861a7c Implemented some locate opcodes 2018-05-07 10:05:29 +02:00
husho
558d44b379 fixed build 2018-05-06 20:19:30 +03:00
Miloslav Číž
db28b7b87a Address simple TODOs in the code (#350)
* Make player gain money from getting into a taxi

* Remove redundant condition in VehicleObject

* Add documenting comment on SpecialModel

* Limit collecting money from each taxi to only once
2018-05-06 10:32:12 -05:00
darkf
512f1d2885
Merge pull request #439 from christoph-heiss/new-opcodes
Implement random number opcodes [0098, 0099, 0208, 0209].
2018-05-06 10:26:28 -05:00
Filip Gawin
63de965e3f Fix condition in sorting
I forgot push suitable rebased commit.
2018-05-06 10:24:07 -05:00
mole99
1d54996adc Reformatting changes 2018-05-06 16:20:00 +02:00
mole99
08d02fd5de Prevent other objects than buoys from floating
As there is no way to distinguish whether an object should float on water or not, the names of the objects have to be hardcoded
2018-05-06 14:53:42 +02:00
Lucas Eriksson
36e73abfd0 Implemented blip opcodes as per #409
Renamed some functions and updated comments accordingly.
2018-05-06 11:43:51 +02:00
mole99
afb7f3f96f Make buoys float again
Until now buoys would just fall down, we need to apply the force with an impulse to make it work. To update the object in debug mode, a tickPhysics function had to be created, like the vehicles already use.
2018-05-05 13:54:26 +02:00
Christoph Heiss
73ddf887f5
Implement opcodes 0098, 0099, 0208 and 0209.
These opcodes are relevant for generating random values.
2018-05-01 22:57:16 +02:00
Christoph Heiss
5745da77d2
Remove unimplemented warnings from implemented opcodes. 2018-05-01 22:57:07 +02:00
darkf
464a1e39b9
Merge pull request #414 from ShFil119/fix/transparent_objects
Fix order of transparent objects
2018-04-30 04:55:46 -05:00
darkf
107d2c7aa5
Merge pull request #330 from ShFil119/fix/deference_null_pointer
Some potential deference of null pointers
2018-04-30 04:49:58 -05:00
darkf
0df204b430
Merge pull request #398 from ShFil119/various
Various, small changes
2018-04-30 04:42:41 -05:00
Filip Gawin
2d5d70c1b2 More constexpr 2018-04-17 16:15:17 +02:00
Filip Gawin
5f5e9f7504 Set args as const if possible 2018-04-17 16:15:17 +02:00
Filip Gawin
2aa6d3b3b3 More nullptr 2018-04-17 16:15:17 +02:00
Filip Gawin
cf5efb9560 Use "= default" for trivial ctor/dtor 2018-04-17 16:15:17 +02:00
Filip Gawin
ecbb0599ed Allow to pause and resume sounds
There's a lot of unneeded operation,
I mean coping strings and searching in loops.

We can get rid of it with extra method (passing
by sound by ref) or coping code.

PS cutscene's sound loses sync, because cutscene
doesn't stop.
2018-04-17 16:09:31 +02:00
Filip Gawin
248d8ef727 Fix order of transparent objects
As https://learnopengl.com/Advanced-OpenGL/Blending
suggests transparent objects should be last.
2018-03-17 19:38:05 +01:00
Daniel Evans
c328132e92 Implement opcodes 0181 and 0182 2018-02-22 00:34:11 +00:00
Anonymous Maarten
2305bb4a33 rwengine: tabs2space of GTA3ModuleImpl.inl
sed -i 's/\t/    /' GTA3ModuleImpl.inl
2018-02-14 23:58:57 +00:00
Filip Gawin
96ed30bc02 Three emplace_backs more 2018-02-14 22:32:08 +00:00
Filip Gawin
1ae0768725 Move temp data(instead of copying) 2018-02-14 22:32:08 +00:00
Anonymous Maarten
4ebc66b544 rwengine+rwgame: add missing includes 2018-02-13 22:15:26 +00:00
Filip Gawin
240b44af8b More fixes double promotion 2018-02-12 09:54:25 +00:00
Christoph Heiss
00bac4c531 Fix build on macOS. 2018-02-09 22:58:49 +00:00
Christoph Heiss
256e5e73ad Fix seat assignment on boats. 2018-02-09 22:53:23 +00:00
Lucas Eriksson
3e96ad9c92 Stop using default initialization onglm datatypes.
It results in undefined behaviour with glm 0.9.9
2018-02-09 22:33:10 +00:00
Filip Gawin
5bf92e5a0b Use range loops in SaveGame.cpp
I've added const at the beginning of file,
arrays converted to type std::array.
2018-02-06 19:19:09 +00:00
Filip Gawin
73a5daab82 Use range loop 2018-02-06 19:19:09 +00:00
Filip Gawin
de77efe225 Add check character for player 2018-02-02 18:12:28 +01:00
Filip Gawin
edcd918f72 Add check reading simplemodel 2018-02-02 18:12:15 +01:00
Florin9doi
e3e3642ec2 Save game location for Windows; fixes #375 2018-02-02 15:32:24 +00:00
Daniel Evans
e2eff314fd Weather: Fix linker error with old GLM 2018-02-01 02:43:48 +00:00
Daniel Evans
61e39aa505 Vehicle Object Component Rule evaluation 2018-02-01 02:43:48 +00:00
Daniel Evans
b35188ab94 correct comprules parsing. Use hex digits 2018-02-01 02:43:48 +00:00
Daniel Evans
9f68e4c95d Interpolate between weather types too 2018-01-30 01:54:15 +00:00
Daniel Evans
4490d91ee1 Load weather data into GLM types instead 2018-01-30 01:48:33 +00:00
Daniel Evans
5d4231f922 Use the WeatherCondition enum without directly indexing into entries 2018-01-30 01:48:33 +00:00
Daniel Evans
d3306922b2 Split Weather Data from the loader
- WeatherLoader now just a namespace with a single function
2018-01-30 01:48:33 +00:00
Florin9doi
e5694b383c Map flashing 2018-01-29 23:50:44 +00:00
Daniel Evans
6f9c3db52e Overahaul of rwviewer to simplify the code and improve usability
- Shared ViewerWidget has been removed. Now multiple instances exist
2018-01-27 21:44:18 +00:00
Daniel Evans
7743626acb Boats have a different DFF structure 2018-01-27 21:36:21 +00:00
Daniel Evans
65f51bc3c2 Skeleton collision effect handling 2018-01-15 21:50:13 +00:00
Daniel Evans
4f0109b17e Tidy up code in object physics handling 2018-01-15 21:50:13 +00:00
Daniel Evans
1c57fb5d98 Refactor Collision Procesing 2018-01-15 21:50:13 +00:00
Daniel Evans
ec9236422b Remove Custom material callback flag 2018-01-15 21:50:13 +00:00
Daniel Evans
869f09ba01 Prevent characters falling through the ground when placed
This was occuring when loading saves created in portland
2018-01-15 01:13:27 +00:00