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
Daniel Evans
1ed182c3f2
Correct splash texture loading
2018-01-13 18:56:27 +00:00
Filip Gawin
a60bc20585
Fix misaligned memory(UB)
...
X86 is able to deal with
misaligned memory, but it can hurt perf.
Other arch like for example mips
is not able to digest it.
So in order of portability we should get
rid of this UB.
2018-01-13 00:49:17 +00:00
Filip Gawin
09b7ead012
Add forgotten virtual dtor
2018-01-13 00:49:17 +00:00
Filip Gawin
3db102a13e
braced initializer
2018-01-08 23:00:30 +00:00
Anonymous Maarten
91b4ec3ac7
rwengine: iwyu: reduce warnings in script subdirectory (+tabs2space)
2018-01-08 22:52:48 +00:00
Anonymous Maarten
c0a4d627af
rwengine: iwyu: reduce warnings in render subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
d07beff43e
rwengine: iwyu: reduce warnings in objects subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
0fc83a97e4
rwengine: iwyu: reduce warnings in loaders subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
e381a6c700
rwengine: iwyu: reduce warnings in items subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
fb58dfb082
rwengine: iwyu: reduce warnings in engine subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
a7203e00a0
rwengine: iwyu: reduce warnings in dynamics subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
e60fd6af6b
rwengine: iwyu: fix warnings in data subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
9b98133a91
rwengine: iwyu: no warnings in core subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
428efd8fb1
openrw: iwyu: reduce warnings in audio subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
b6b53ffdad
rwengine: iwyu: reduce warnings in ai subdirectory
2018-01-08 22:52:48 +00:00
Anonymous Maarten
29188f26f2
rwengine: iwyu: fix TextureArchive and BinaryStream
2018-01-08 22:52:48 +00:00
Anonymous Maarten
90acef28f7
rwlib: iwyu: reduce warnings
...
- use mapping file
- forward define FileContentsInfo, CutsceneTracks, GameTexts
- no more "#pragma once"
- add mapping file
2018-01-08 22:52:48 +00:00
Filip Gawin
6d80ce6424
Cleanup, use c++11 override
...
Maybe some of replace with
final, what do think?
2018-01-08 22:35:21 +00:00
Filip Gawin
caa5575573
Add check reading animation ptr
2018-01-08 23:09:43 +01:00
Filip Gawin
8cc8be5603
Small change, new -> make_shared.
2018-01-05 06:51:58 +00:00
Anonymous Maarten
382c28c9e3
rwengine: fix "initialization of 'specialPrefix' is skipped by 'default' label
...
vs2017: Compiler error C2361
2018-01-05 06:21:34 +00:00
Filip Gawin
ef4456e623
size() -> empty()
...
Empty has always
computational complexity O(1).
2017-12-17 01:48:49 +00:00
Miloslav Číž
57284fdade
Fix particle rendering transform matrix
2017-11-20 21:48:00 +00:00
Filip Gawin
d934f1c9b0
Forgotten flush of packet
2017-11-17 22:53:42 +00:00
Anonymous Maarten
c5523d6728
rwengine: Remove usused SCMTypeInfoTable
2017-11-17 00:50:50 +00:00
Anonymous Maarten
6142e0bf80
rwengine: remove unused ScriptDisassembly
2017-11-17 00:50:50 +00:00
Anonymous Maarten
deb7db5faf
rwengine: remove ScriptFunctionMeta->conditional + extended definition
...
Not used anywhere
2017-11-17 00:50:50 +00:00
Anonymous Maarten
4bf95cd903
rwengine: SCMMicrocode is not used anywhere
2017-11-17 00:50:50 +00:00
Anonymous Maarten
5299f4df08
spelling: yeild -> yield
2017-11-17 00:50:50 +00:00
Anonymous Maarten
85ac15078a
rwengine: Removed unused functions and defines
2017-11-17 00:50:50 +00:00
Anonymous Maarten
1378931eba
rwengine: throw runtime_error on shader error instead of straight exit
2017-11-17 00:50:50 +00:00
Anonymous Maarten
32fb5eb409
rwlib: LoaderIMG accepts rwfs::path
2017-11-17 00:50:50 +00:00
Anonymous Maarten
820c4bd25c
rwengine: GameData accepts rwfs::path as path of game data
2017-11-17 00:50:50 +00:00
Daniel Evans
9c48b4424a
Add build time option for CXX17 or boost filesystem
2017-10-31 00:55:19 +00:00
Anonymous Maarten
a40a2706a9
cmake: add support for include-what-you-use to check #include's
...
The output is currently very verbose and includes many false positives.
Adding a mapping file should solve this.
See
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUMappings.md
2017-10-29 20:40:57 +00:00
Anonymous Maarten
5dc707aaed
cmake: make OpenAL an imported target
2017-10-29 20:40:57 +00:00
Anonymous Maarten
6ccf85b770
cmake: make bullet an imported target
2017-10-29 20:40:57 +00:00
Anonymous Maarten
9f1ba0fe76
cmake: make ffmpeg an imported target
2017-10-29 20:40:57 +00:00
Anonymous Maarten
47dbea1bb4
cmake: make glm an imported target
2017-10-29 20:40:57 +00:00
Anonymous Maarten
f5a237bf7b
cmake: reformat rwengine/CMakeLists.txt
2017-10-29 20:40:57 +00:00
Anonymous Maarten
1926795d63
cmake: use rwengine::interface + no more add_definitions & include_directories
2017-10-29 20:40:57 +00:00
Filip
b9d306ae70
Improving handling game shaders ( #302 )
...
* move delete to earlier stage
* lines for better readability
* Added detach shader
* Addition forgotten glDeleteProgram
https://github.com/rwengine/openrw/search?utf8=%E2%9C%93&q=glDeleteProgram&type=
In project there's no necessary clearing call of glDeleteProgram.
* Removing/Closing shader programs
Each shader program should be taken care by glDeleteProgram.
To make it works/usefull, each shader's raw ptr will convertet to unique_ptr
in next commit.
* Converting ShaderProgram's ptr to unique
Actually deleting isn't handled,
so this commit removes memory leak.
2017-10-29 18:47:52 +00:00
Filip
c54cfa0ae8
Avoid making unnecessary copies ( #337 )
...
* frames.emplace_back
* vehicleColours.emplace_back
* colours.emplace_back
* waterBlocks.emplace_back
* state.garages.emplace_back
* bonedata->frames.emplace_back
* lines.emplace_back
* circleVerts.emplace_back
* geo.emplace_back
* Water renderer
* perf_colours.emplace_back
2017-10-29 17:14:07 +00:00
Filip Gawin
9aa01b69e1
Resolve cases found by gcc-5
2017-10-26 21:22:08 +01:00
Filip Gawin
512ac6f5ee
Fix double promotion
2017-10-25 01:17:46 +01:00
Daniel Evans
43047269ab
Offset vehicle spawn height to account for dimensions
...
Should prevent vehicles spawning in, and falling through, the ground.
2017-10-19 23:42:41 +01:00
Anonymous Maarten
14ef8c2539
rwengine: incorporate review
2017-10-18 21:52:29 +01:00
Anonymous Maarten
8012a5065d
rwengine: Store btOverlappingPairCallback in GameWorld
...
Should fix this memory leak:
==16721== 8 bytes in 1 blocks are definitely lost in loss record 7 of 264
==16721== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721== by 0x7E7B5D: GameWorld::GameWorld(Logger*, GameData*) (GameWorld.cpp:100)
==16721== by 0x76EC0B: std::_MakeUniq<GameWorld>::__single_object std::make_unique<GameWorld, Logger*,
GameData*>(Logger*&&, GameData*&&) (unique_ptr.h:825)
==16721== by 0x760F50: RWGame::newGame() (RWGame.cpp:107)
==16721== by 0x78E713: LoadingState::enter() (LoadingState.cpp:9)
==16721== by 0x76602B: void StateManager::enter<LoadingState, RWGame*, RWGame::RWGame(Logger&, int, ch
ar**)::{lambda()#1}>(RWGame*&&, RWGame::RWGame(Logger&, int, char**)::{lambda()#1}&&) (StateManager.hpp:4
0)
==16721== by 0x760842: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:81)
==16721== by 0x750385: main (main.cpp:13)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
a610ea2387
rwengine: store btCollisionShape along btRigidBody in Part
...
Should fix this memory leak:
==16721== 103 bytes in 1 blocks are definitely lost in loss record 181 of 264
==16721== at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==16721== by 0x58F1AF3: ??? (in /usr/lib64/libLinearMath.so.2.83)
==16721== by 0x83E3C9: btBoxShape::operator new(unsigned long) (btBoxShape.h:34)
==16721== by 0x83CD75: VehicleObject::createObjectHinge(VehicleObject::Part*) (VehicleObject.cpp:722)
==16721== by 0x83C251: VehicleObject::setPartLocked(VehicleObject::Part*, bool) (VehicleObject.cpp:610)
==16721== by 0x83C2D0: VehicleObject::setPartTarget(VehicleObject::Part*, bool, float) (VehicleObject.cpp:623)
==16721== by 0x7B10CD: Activities::EnterVehicle::update(CharacterObject*, CharacterController*) (CharacterController.cpp:226)
==16721== by 0x7B062D: CharacterController::updateActivity() (CharacterController.cpp:26)
==16721== by 0x7B09FE: CharacterController::update(float) (CharacterController.cpp:98)
==16721== by 0x8EBBFA: DefaultAIController::update(float) (DefaultAIController.cpp:87)
==16721== by 0x82ED5A: CharacterObject::tick(float) (CharacterObject.cpp:240)
==16721== by 0x763630: RWGame::tick(float) (RWGame.cpp:506)
==16721==
==16721== 120 bytes in 5 blocks are definitely lost in loss record 187 of 264
==16721== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721== by 0x8EBA26: DefaultAIController::update(float) (DefaultAIController.cpp:63)
==16721== by 0x82ED5A: CharacterObject::tick(float) (CharacterObject.cpp:240)
==16721== by 0x763630: RWGame::tick(float) (RWGame.cpp:506)
==16721== by 0x763128: RWGame::run() (RWGame.cpp:420)
==16721== by 0x750394: main (main.cpp:15)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
eba262b789
rwengine: make Activity a std::unique_ptr
...
Should fix this memory leak:
==16721== 120 bytes in 5 blocks are definitely lost in loss record 187 of 264
==16721== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721== by 0x8EBA26: DefaultAIController::update(float) (DefaultAIController.cpp:63)
==16721== by 0x82ED5A: CharacterObject::tick(float) (CharacterObject.cpp:240)
==16721== by 0x763630: RWGame::tick(float) (RWGame.cpp:506)
==16721== by 0x763128: RWGame::run() (RWGame.cpp:420)
==16721== by 0x750394: main (main.cpp:15)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
e448f610ff
rwengine: make Renderer a shared_ptr
...
Should fix this memory leak:
==16721== 912 (600 direct, 312 indirect) bytes in 1 blocks are definitely lost in loss record 225 of 264
==16721== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721== by 0x84A697: GameRenderer::GameRenderer(Logger*, GameData*) (GameRenderer.cpp:71)
==16721== by 0x75FC7D: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:35)
==16721== by 0x750385: main (main.cpp:13)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
8175666092
rwengine: make AnimationBone a shared pointer
...
Should fix this memory leak:
==10780== 4,341,444 (269,712 direct, 4,071,732 indirect) bytes in 3,746 blocks are definitely lost in los
s record 2,652 of 2,654
==10780== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==10780== by 0x8219B2: LoaderIFP::loadFromMemory(char*) (LoaderIFP.cpp:82)
==10780== by 0x7C22C0: GameData::loadIFP(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameData.cpp:506)
==10780== by 0x7BD838: GameData::load() (GameData.cpp:59)
==10780== by 0x75CD35: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:51)
==10780== by 0x74CDE5: main (main.cpp:13)
==10780==
==10780== 6,516,576 (13,968 direct, 6,502,608 indirect) bytes in 194 blocks are definitely lost in loss record 2,654 of 2,654
==10780== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==10780== by 0x8219B2: LoaderIFP::loadFromMemory(char*) (LoaderIFP.cpp:82)
==10780== by 0x7C22C0: GameData::loadIFP(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameData.cpp:506)
==10780== by 0x7E7ECC: GameWorld::loadCutscene(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameWorld.cpp:693)
==10780== by 0x87453E: opcode_02e4(ScriptArguments const&, char const*) (GTA3ModuleImpl.inl:8245)
==10780== by 0x8D8149: void script_bind::call_unpacked<0u, 2u, void>::call<void (*)(ScriptArguments const&, char const*), ScriptArguments const&, char const*>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&, ScriptArguments const&, char const*&&) (ScriptModule.hpp:80)
==10780== by 0x8D2765: void script_bind::call_unpacked<1u, 1u, void, char const*>::call<void (*)(ScriptArguments const&, char const*), ScriptArguments const&>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&, ScriptArguments const&) (ScriptModule.hpp:90)
==10780== by 0x8C7EFE: void script_bind::call_unpacked<2u, 0u, void, ScriptArguments const&, char const*>::call<void (*)(ScriptArguments const&, char const*)>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&) (ScriptModule.hpp:90)
==10780== by 0x8B5A05: void script_bind::binder<void, ScriptArguments const&, char const*>::call<void (*)(ScriptArguments const&, char const*)>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&) (ScriptModule.hpp:104)
==10780== by 0x8A2E3A: void script_bind::do_unpacked_call<void, ScriptArguments const&, char const*>(void (* const&)(ScriptArguments const&, char const*), ScriptArguments const&) (ScriptModule.hpp:137)
==10780== by 0x893BB0: void ScriptModule::bind<void (*)(ScriptArguments const&, char const*)>(unsigned short, int, void (*)(ScriptArguments const&, char const*))::{lambda(ScriptArguments const&)#1}::operator()(ScriptArguments const&) const (ScriptModule.hpp:166)
==10780== by 0x8B5A8D: std::_Function_handler<void (ScriptArguments const&), void ScriptModule::bind<void (*)(ScriptArguments const&, char const*)>(unsigned short, int, void (*)(ScriptArguments const&, char const*))::{lambda(ScriptArguments const&)#1}>::_M_invoke(std::_Any_data const&, ScriptArguments const&) (std_function.h:316)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
5e330346ec
rwengine: delete corona VisualFX on delete of PickupObject
...
Should fix this memory leak:
==31441== 1,184 (1,144 direct, 40 indirect) bytes in 11 blocks are definitely lost in loss record 2,344 of 2,723
==31441== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==31441== by 0x7E30D5: GameWorld::createEffect(VisualFX::EffectType) (GameWorld.cpp:495)
==31441== by 0x82CE16: PickupObject::PickupObject(GameWorld*, glm::tvec3<float, (glm::precision)0> const&, BaseModelInfo*, PickupObject::PickupType) (PickupObject.cpp:126)
==31441== by 0x82C505: ItemPickup::ItemPickup(GameWorld*, glm::tvec3<float, (glm::precision)0> const&, BaseModelInfo*, PickupObject::PickupType, WeaponData*) (ItemPickup.cpp:11)
==31441== by 0x7E2953: GameWorld::createPickup(glm::tvec3<float, (glm::precision)0> const&, int, int) (GameWorld.cpp:389)
==31441== by 0x86D209: opcode_0213(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&) (GTA3ModuleImpl.inl:6350)
==31441== by 0x8DC0EF: void script_bind::call_unpacked<0u, 7u, void>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0>&, ScriptObjectType<PickupObject> >(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0>&, ScriptObjectType<PickupObject>&&) (ScriptModule.hpp:80)
==31441== by 0x8D9B82: void script_bind::call_unpacked<1u, 6u, void, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0> >(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0>&&) (ScriptModule.hpp:90)
==31441== by 0x8D6753: void script_bind::call_unpacked<2u, 3u, void, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int&, int>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&, int&&) (ScriptModule.hpp:90)
==31441== by 0x8D213D: void script_bind::call_unpacked<3u, 2u, void, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&&) (ScriptModule.hpp:90)
==31441== by 0x8CBEE0: void script_bind::call_unpacked<4u, 1u, void, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&) (ScriptModule.hpp:90)
==31441== by 0x8C0078: void script_bind::call_unpacked<5u, 0u, void, ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&)>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&) (ScriptModule.hpp:90)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
8e98cf2311
rwengine: Pass CharacterController to the CharacterObject constructor
...
The CharacterObject should remove the CharacterController upon
destruction.
Should fix this memory leak:
==31441== 480 (360 direct, 120 indirect) bytes in 5 blocks are definitely lost in loss record 2,038 of 2,723
==31441== at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==31441== by 0x7E2370: GameWorld::createPedestrian(unsigned short, glm::tvec3<float, (glm::precision)0> const&, glm::tquat<float, (glm::precision)0> const&, unsigned int) (GameWorld.cpp:334)
==31441== by 0x8E2F01: TrafficDirector::populateNearby(ViewCamera const&, float, int) (TrafficDirector.cpp:164)
==31441== by 0x7E1170: GameWorld::createTraffic(ViewCamera const&) (GameWorld.cpp:176)
==31441== by 0x75C616: RWGame::tick(float) (RWGame.cpp:531)
==31441== by 0x75BF18: RWGame::run() (RWGame.cpp:420)
==31441== by 0x749184: main (main.cpp:15)
2017-10-18 21:52:29 +01:00