1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 21:19:57 +00:00
Commit graph

12 commits

Author SHA1 Message Date
fredzio
23137d0c54 Revert a wrong change introduced in MR 546
A prerequisite to create physics objects for statics was to remove the
dependency on base node (since it doesn't yet exists) for object
position. It is still necessary for animation though.

Restore the basenode (and the associated FIXME) so that animated objects works properly.
2021-01-27 16:24:11 +01:00
fredzio
165c731492 Remove physics dependency on basenode
Necessary to be able to load physics objects from inactive cells.
2021-01-24 14:10:27 +01:00
fredzio
d015f17a6c Make all physics object manage their own resources
Use smart pointer for heightfields and their members.
Move collision object addition inside of Object's ctor, as for Actors and HeightFields
2021-01-10 14:56:35 +01:00
Andrei Kortunov
dc7b48e92e Generate physics collisions for projectiles (bug #3372)
Remove redundant now mHit field
2020-12-08 09:05:38 +01:00
fredzio
3c2504b442 Process movement queue in one or several background threads
Before movement calculation, the main thread prepare a
vector of ActorFrameData, which contains all data necessary to perform
the simulation, and feed it to the solver. At the same time it fetches
the result from the previous background simulation, which in turn is
used by the game mechanics.
Other functions of the physics system (weapon hit for instance)
interrupt the background simulation, with some exceptions described
below.

The number of threads is controlled by the numeric setting

[Physics]
async num threads

In case 'async num threads' > 1 and Bullet doesn't support multiple threads,
1 async thread will be used. 0 means synchronous solver.
Additional settings (will be silently switched off if async num threads = 0)

[Physics]
defer aabb update

Update AABBs of actors and objects in the background thread(s). It is not an especially
costly operation, but it needs exclusive access to the collision world, which blocks
other operations. Since AABB needs to be updated for collision detection, one can queue
them to defer update before start of the movement solver. Extensive tests on as much
as one installation (mine) show no drawback having that switched on.

[Physics]
lineofsight keep inactive cache

Control for how long (how many frames) the line of sight (LOS) request will be kept updated.
When a request for LOS is made for the first time, the background threads are stopped to
service it. From now on, the LOS will be refreshed preemptively as part of the background
routine until it is not required for lineofsight keep inactive cache frames. This mean
that subsequent request will not interrupt the background computation.
2020-10-15 06:41:35 +02:00
fredzio
d76cc5d0a9 Make the Object class manage its collision object and position. 2020-10-15 06:41:16 +02:00
fredzio
82da2045a9 Non functionnal changes in preparation for async physics feature 2020-10-15 06:41:03 +02:00
Andrei Kortunov
4a5fce8ca5 Use more C++11 in the physics code 2020-06-26 14:22:00 +04:00
Grigory Latyshev
3872d7476b Move makeOsgVec3f() to settingsutils.hpp
Remove all other makeOsgVec3f() implementations
2019-02-28 20:03:42 +00:00
Andrei Kortunov
3032b177a1 Remove redundant includes 2019-02-23 08:02:12 +04:00
elsid
fa23b590a4
Add unwalkable areas to NavMesh 2018-10-13 22:16:32 +03:00
elsid
c866fdff86
Move physics object, heightfield, ptrholder into separate files 2018-10-13 22:16:24 +03:00