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

3199 commits

Author SHA1 Message Date
fredzio
e5fa457fe7 Properly account for interleaved move of actors.
Before this change, if an actor position was changed while the physics
simulation was running, the simulation result would be discarded. It is
fine in case of one off event such as teleport, but in the case of
scripts making use of this functionality to make lifts or conveyor (such
as Sotha Sil Expanded mod) it broke actor movement.

To alleviate this issue, at the end of the simulation, the position of the Actor
in the world is compared to the position it had at the beginning of the
simulation. A difference indicate a force move occured. In this case,
the Actor mPosition and mPreviousPosition are translated by the difference of position.

Since the Actor position will be really set while the next simulation runs, we
save it in the mNextPosition field.
2020-11-14 20:39:16 +01:00
Frederic Chardon
ecd10a731e Compute the rotation normal relative to the door axe, not the world. 2020-11-02 14:12:42 +01:00
fredzio
18e38d8810 Do not block a door when it turns away. 2020-11-01 23:01:18 +01:00
psi29a
ba3aad31c1 Merge branch 'hitdebug' into 'master'
Visualize hits in the debug overlay

See merge request OpenMW/openmw!379
2020-11-01 10:20:14 +00:00
Alexei Dobrohotov
53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
2020-11-01 01:58:56 +03:00
Evil Eye
7065282127 Save and load container records; fixes #5668 2020-10-29 13:55:24 +01:00
psi29a
8f68f08aee Merge branch 'moonmoon' into 'master'
Change moon phase to an enum class

See merge request OpenMW/openmw!381
2020-10-27 19:44:30 +00:00
Evil Eye
3bf5247c0b remove forward declaration 2020-10-27 19:23:07 +01:00
Evil Eye
2c4cafa41a Change moon phase to an enum class 2020-10-26 22:16:31 +01:00
Evil Eye
0512a574e8 Fix remove item regression 2020-10-26 20:13:24 +01:00
fredzio
e8c0a7bec0 Visualie projectile hits 2020-10-26 13:53:36 +01:00
Evil Eye
f62905eb0a remove redundant argument 2020-10-20 21:04:35 +02:00
psi29a
09373a757d Merge branch 'radioactive' into 'master'
Container base record mutations

See merge request OpenMW/openmw!353

(cherry picked from commit 8b33765dd414680f0074b3e115b52b291b4cb7cb)

275908a0 mutate container base records
16fca11d add changelog entry
2020-10-20 16:56:22 +00:00
Andrei Kortunov
065ed5138e Use emplace_back instead of push_back 2020-10-18 10:27:35 +04:00
Alexei Dobrohotov
f90e403bc1 Avoid summon spawn if actor isn't in a cell (bug #5644) 2020-10-18 01:42:32 +03:00
Andrei Kortunov
8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04: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
Assumeru
72549651e0
Rework container resolution (#3006)
* Rework container resolution

* add optional argument to getCount

* remove now-redundant changes

* undo worldimp changes

* move save-fixing code to InventoryState

* replace Rng instances with Seeds
2020-10-13 17:46:32 +02:00
Alexei Dobrohotov
39678c74bf Add many more godmode checks to harmful magic (bug #5633) 2020-10-09 20:36:51 +03:00
Charles Calhoun
14aacb81c5 Fix follower aggression when traveling. Summoning still has problems but less intrusive than current implementation. 2020-10-03 20:05:17 +00:00
Evil Eye
fe82cd9f92 Don't search containers 2020-09-15 21:13:18 +02:00
Andrei Kortunov
924f634bda Support for multiple summons with same ID in the single spell 2020-08-28 21:14:54 +04:00
psi29a
f90a049702 Merge branch 'movement_refactoring' into 'master'
Refactoring related to "smooth movement"

See merge request OpenMW/openmw!285

(cherry picked from commit 6eaf0a389d5aed3b74ab1a7cf89574612f964bdf)

e847b4c8 Split getSpeed() to getMaxSpeed() and getCurrentSpeed()
a96c46bc Refactor calculation of movement.mSpeedFactor
03ee9090 Use getMaxSpeed instead of getCurrentSpeed where it makes sense.
a178af5c Create helper functions `normalizeAngle` and `rotateVec2f`
2020-08-27 11:54:30 +00:00
elsid
80e23536cb Merge branch 'camera_refactoring' into 'master'
Camera refactoring

See merge request OpenMW/openmw!271
2020-08-22 22:15:18 +00:00
Andrei Kortunov
7f342374fc Fix crash when using 'showscenegraph 1' console command 2020-08-12 11:16:10 +04:00
Petr Mikheev
0de6650add Add RayCastingInterface 2020-08-06 22:03:33 +02:00
Petr Mikheev
e9b2e9b474 Remove camera stuff from RenderingManager 2020-08-06 00:43:33 +02:00
Petr Mikheev
694e0b5906 Refactoring. Simplification of camera interface. 2020-08-06 00:43: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
Alexei Dobrohotov
eed8902380
Merge pull request #2982 from Assumeru/explain
Comments to explain the arcane workings of Morrowind
2020-08-05 18:05:55 +03:00
Perry Hugh
4bf24a955e Restore Gamepad Zooming 2020-08-04 06:04:59 +00:00
unknown
073a7f2b2d Comments to explain the arcane workings of Morrowind 2020-07-30 21:39:04 +02:00
Evil Eye
6ad20ec9c7 Mutate base records when adding/removing spells 2020-07-28 08:33:28 +02:00
Evil Eye
040a92c373 implement additem/removeitem for non-unique actors 2020-07-26 11:07:18 +02:00
Petr Mikheev
2e6aa155a3 New settings 'preview if stand still' and 'deferred preview rotation'. 2020-07-19 18:21:40 +02:00
Petr Mikheev
9f850b6ffc Move deferred rotation logic from renderingmanager.cpp to camera.cpp 2020-07-19 18:21:40 +02:00
Petr Mikheev
4d206d2c67 Improved preview mode 2020-07-17 20:35:52 +02:00
Petr Mikheev
68148f5ec7 1. Skip smooth camera transition after changing cell; 2. Fix 'zoom out when move' for extremely high speed; 2020-07-16 22:21:50 +02:00
Evil Eye
271f7040a6 Fix a regression caused by #2648 (fixes #5513) 2020-07-12 13:25:40 +02:00
Andrei Kortunov
7f936e4cde
Merge pull request #2961 from akortunov/move
Do not use outdated references when moving objects to new cells
2020-07-12 12:11:22 +04:00
Andrei Kortunov
58e3900ea0 Avoid redundant call 2020-07-11 20:11:49 +04:00
Andrei Kortunov
db8f0ad6fd Do not use outdated references when moving objects to new cells (bug #5387) 2020-07-11 17:24:20 +04:00
Bret Curtis
bbba524a6c Resolves #5517 by removing the object being rotated from the paging system. 2020-07-09 22:36:57 +02:00
Bret Curtis
0c2fea8254
Merge pull request #2932 from elsid/replace_open_threads
Replace OpenThreads by std types
2020-07-04 13:11:23 +02:00
Andrei Kortunov
27f1a3376c Add a separate stats watcher for GUI 2020-07-01 15:55:44 +04:00
elsid
40ad87bc4d
Replace OpenThreads by std types 2020-06-25 22:16:09 +02:00
Petr Mikheev
d3bd67d747 Advanced third person camera. 2020-06-22 15:22:34 +02:00
Bret Curtis
c944acf26b
Merge pull request #2913 from akortunov/warnfix
Get rid of ECLD and dependencies
2020-06-17 15:00:57 +02:00