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

68 commits

Author SHA1 Message Date
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
91b3926a49 We need to update the collision world after each step.
Change order of traversal simulation step to make it rare enough to be parallelizable

Before:
for actor in actors:
    repeat numstep:
        solve(actor)
After:
repeat numstep:
    for actor in actors:
        solve(actor)

Introduce struct ActorFrameData to pack all data that is necessary for
the solver
2020-10-15 06:41:22 +02:00
fredzio
82da2045a9 Non functionnal changes in preparation for async physics feature 2020-10-15 06:41:03 +02:00
Andrei Kortunov
f9e667dd8c Fix MSVC warnings 2020-08-26 12:34:27 +04:00
Petr Mikheev
0de6650add Add RayCastingInterface 2020-08-06 22:03:33 +02:00
Petr Mikheev
ed3426cf2f Move third person camera collision check from World::updatePlayer() to Camera::updatePosition() 2020-08-06 00:43:33 +02:00
bzzt lost a hitlab login
89ec6cfea2 tooltips labels
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
elsid
69df6098e5
Report frame number, number of actors and objects to stats 2020-05-22 17:39:18 +02:00
Capostrophic
ca6cce0c7e Separate Stepper 2020-03-31 00:38:34 +03:00
elsid
4a0c056489
Do not wander to occupied area by other actor 2020-02-10 22:29:54 +01:00
elsid
43b39e8418
Use not scaled player half extents as default to find path 2019-03-04 22:59:38 +03:00
Bret Curtis
14c93b3df0 Revert "Merge pull request #2204 from elsid/fix_navigator_update"
This reverts commit 26fb0e7a0f, reversing
changes made to 42b2391303.
2019-03-04 11:06:15 +01:00
elsid
c066ee9dc5
Use not scaled player half extents as default to find path 2019-03-03 16:21:12 +03:00
Capostrophic
a584aa25ab Don't re-enable collision object for dead actors 2019-02-04 22:13:30 +03:00
Andrei Kortunov
a53333c3d5 Native animated containers support (feature #4730) 2018-12-13 23:11:16 +04:00
elsid
49d81241db Merge branch 'master' into pathfinder_detour 2018-10-28 17:08:09 +03:00
Andrei Kortunov
e7de6b974a Optimize actors processing
1. Do not update physics and animations for actors outside processing range (bug #4647)
2. Do not render such actors
3. Add transparency to actors near processing border, so they will not pop up suddenly
2018-10-25 22:52:59 +04:00
elsid
144e1a063b
Support animated objects 2018-10-13 22:16:30 +03:00
elsid
fafba8ea0c
Use recastnavigation to find path 2018-10-13 22:16:25 +03:00
scrawl
99ffaafe30
Revert "Merge pull request #1701 from akortunov/standfix"
This reverts commit da47fc79f5, reversing
changes made to 7324bd368f.
2018-05-26 11:35:48 +00:00
Andrei Kortunov
3636cf2015 Do not apply queue movement for standing actors 2018-05-05 22:41:26 +04:00
Andrei Kortunov
62177ebb30 Move physics framerate from setting to environment variable 2017-09-26 21:23:15 +04:00
Ewan Higgs
38a2de3c51 convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
Allofich
ff3e307059 Pass parameters by const reference 2017-04-20 23:47:03 +09:00
Allofich
c655875584 Change mWaterEnabled from float to bool 2017-04-20 01:09:52 +09:00
scrawl
0fc465da59 Store the min/max height in LandData 2017-03-14 19:27:55 +01:00
scrawl
9a3a64f0c4 Add resource manager for ESM::Land to allow data to be unloaded when no longer required 2017-03-14 19:27:55 +01:00
Allofich
6b53541571 Prevent AI actors from hitting unintended targets
(Fixes #3254)
2017-02-12 19:51:19 +09:00
scrawl
6ecc008813 Fix an issue uncovered by the last commit related to changing actor position without properly moving the actor 2017-02-10 02:43:49 +01:00
Leon Krieg
739cd5ba45 Fixed more spelling mistakes 2016-12-15 13:09:40 +01:00
Allofich
0e429ae41d Make water walking mechanics closer to original MW 2016-11-20 22:21:33 +09:00
scrawl
910e41e3c4 Allow an Object to be specified as ignore parameter for castRay 2016-03-05 15:56:19 +01:00
scrawl
383524c688 Run physics in fixed timesteps, use the remainder to interpolate between current and previous state
Based on http://gafferongames.com/game-physics/fix-your-timestep/
2016-02-13 03:03:34 +01:00
scrawl
1457a0de78 Use the UnrefQueue to delete BulletShapeInstances 2016-02-09 19:04:59 +01:00
scrawl
6f9ca0f68f Add basic cell preloader class
Not properly in use yet, but seems to be working.
2016-02-07 00:14:13 +01:00
scrawl
df57d4bfba Use a common base class for resource managers
Implement updateCache to delete unreferenced cached objects when they have not been referenced for a while.
2016-02-06 17:22:17 +01:00
scrawl
2c51e7345f Use a separate collision type for doors (Fixes #1962) 2015-12-18 18:32:42 +01:00
scrawl
a0fb31e3b1 Accept a ConstPtr in getLOS 2015-12-18 18:03:47 +01:00
scrawl
388aed1748 Accept a ConstPtr in findContainer, collision script functions, getUnderwater functions 2015-12-18 17:56:48 +01:00
scrawl
6c505ca06f Accept a ConstPtr in getHitContact 2015-12-18 17:38:21 +01:00
scrawl
0796f49c17 Accept a ConstPtr in various physics getters 2015-12-18 17:36:14 +01:00
scrawl
795032621c Use a ConstPtr for the ActorMap and ObjectMap 2015-12-18 17:30:39 +01:00
scrawl
43de13fa99 Do not allow resting on lava 2015-11-20 19:22:31 +01:00
scrawl
894477849a Store animated collision objects in a separate container 2015-11-19 23:33:08 +01:00
scrawl
a49058721e Use a contactTest for collision script functions
The previous method didn't work for stationary actors. This change fixes the grinder in "Sotha Sil, Dome of Kasia" not registering collisions if the player stands still. (Fixes #1934)
2015-11-18 21:20:12 +01:00
scrawl
3453353091 AiCombat distance check takes into account collision box (Fixes #1699) 2015-11-18 19:00:43 +01:00
scrawl
8cf57ef6ac Move BulletShapeManager and BulletShape to resource/ 2015-11-17 00:20:15 +01:00
scrawl
a5f8ffb83d aimToTarget: Fix the collision box translation not being taken into account 2015-11-03 18:15:47 +01:00
scrawl
bd9dc58560 Use the correct scale for actor swim height (Fixes #2833) 2015-11-01 21:45:58 +01:00
scrawl
c4b5a41ac3 Improve combat AI vertical aiming (Fixes #1366, Fixes #1330) 2015-09-17 03:41:15 +02:00