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

156 commits

Author SHA1 Message Date
David Cernat
1f0cb09933 Add OpenMW commits up to 1 Jun 2021
# Conflicts:
#   .travis.yml
#   README.md
2021-06-01 17:22:52 +02:00
jvoisin
e51669c05d Don't assign a variable passed by value 2021-05-21 18:15:31 +02:00
David Cernat
7a6dfc61ec Add OpenMW commits up to 21 May 2021
# Conflicts:
#   CMakeLists.txt
#   apps/openmw/mwscript/interpretercontext.cpp
#   components/CMakeLists.txt
2021-05-21 16:00:09 +02:00
elsid
1e2aae8095
Use stable sort+unique to collect RefIDs for ESMStore records counting
The idea is to avoid std::map lookup for each CellRef. Instead generate a
sequence of added and removed RefNums into a vector then order them by RefNum
using a stable sort that preserves relative order of elements with the same
RefNum. RefIDs are stored in a different vector to avoid std::string move ctor
calls when swapping elements while sorting. Reversed iteration over added and
removed RefNums for each unique RefNum is an equivalent to what map-based
algorithm produces. The main benefit from sorting a vector is a data locality
that means less cache misses for each access. Reduces ESMStore::countRecords
perf cycles by 25%.
2021-05-15 18:45:22 +02:00
psi29a
fd89582e0c Merge branch 'navmesh_wait' into 'master'
Wait until navmesh is generated within given distance around player (#5500)

Closes #5500

See merge request OpenMW/openmw!819
2021-05-13 16:56:39 +00:00
elsid
626e032931
Do not store callback inside Misc::Barrier
The only wait method can be provided with it so pass it as a template
parameter there.
2021-05-05 23:42:47 +02:00
elsid
f169f8e6f0
Wait until navmesh is generated for interior cells
Add special loading progress bar.

It should be fast enough to not keep loading screen for noticably long but
will provide better pathfinding for actors inside interior cells.
2021-05-05 19:27:49 +02:00
David Cernat
a3f304107b Add OpenMW commits up to 2 May 2021
# Conflicts:
#   components/CMakeLists.txt
2021-05-02 20:55:49 +02:00
Andrei Kortunov
f308dde254 Clean up MSVC warnings 2021-04-17 12:14:50 +04:00
fredzio
16b288f53c Re-add dropped struct keyword to fix build.
rtprio is both a struct and a function, so we need to be explicit.

../../../components/misc/thread.cpp:53:9: error: must use 'struct' tag
to refer to type 'rtprio' in this scope
rtprio prio;
^
struct
/usr/include/sys/rtprio.h:91:5: note: struct 'rtprio' is hidden by a
non-type declaration of 'rtprio' here
int     rtprio(int, pid_t, struct rtprio *);
^
1 error generated.
2021-04-16 08:38:11 +02:00
psi29a
c686dd05d0 Merge branch 'thread_idle_priority' into 'master'
Set idle priority for navmesh generation thread

See merge request OpenMW/openmw!632
2021-04-15 19:32:23 +00:00
elsid
ab8d1c02d4
Set idle priority for navmesh generation thread
Support Linux, Windows, FreeBSD.
2021-04-14 21:39:06 +02:00
David Cernat
cedf70f367 Add OpenMW commits up to 13 Apr 2021
# Conflicts:
#   .travis.yml
#   apps/openmw/mwmechanics/actors.cpp
#   apps/openmw/mwmechanics/summoning.cpp
#   apps/openmw/mwphysics/mtphysics.hpp
2021-04-13 23:52:37 +02:00
glassmancody.info
582f7b52cf Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 2021-04-13 11:09:52 -07:00
glassmancody.info
9e80091aff clear up force shaders and make it less convoluted 2021-04-13 11:09:49 -07:00
Andrei Kortunov
124a33d8a3 Fix uninitialized variables 2021-04-10 10:58:00 +04:00
Max
2cd96e56d5 create constant and use constant in other parts of the code base 2021-03-24 14:54:46 -07:00
psi29a
415591b7ed Merge branch 'ai_reaction_deviation' into 'master'
Distribute AI reactions and engage combat calls over time

See merge request OpenMW/openmw!674
2021-03-22 21:37:09 +00:00
wareya
63f01d8c5f Prevent physics death spiral by falling back to true delta time when needed 2021-03-21 20:45:46 +00:00
elsid
675c0ab72f
Apply uniform random deviation to AI reaction timer
This allows to distribute AI reaction calls over time.

Before this change actors appearing at the same frame will react in the same
frame over and over because AI reaction period is constant. It creates a
non-uniform CPU usage over frames. If a single frame has too many AI reactions
it may cause stuttering when there are too many actors on a scene for current
system.

Another concern is a synchronization of actions between creatures and NPC.
They start to go or hit at the same frame that is unnatural.
2021-03-20 14:47:54 +01:00
David Cernat
39dc6fc355 Add OpenMW commits up to 24 Feb 2021
# Conflicts:
#   CI/before_script.linux.sh
#   CMakeLists.txt
#   apps/openmw/CMakeLists.txt
#   components/CMakeLists.txt
2021-02-24 13:02:57 +02:00
David Cernat
7e188f2dd6 Add OpenMW commits up to 14 Feb 2021
# Conflicts:
#   apps/openmw/mwclass/door.cpp
#   apps/openmw/mwscript/aiextensions.cpp
2021-02-14 19:49:22 +02:00
elsid
8ab5fd9b40
Fix frame rate limit
Measure time at the computation end but before sleep. This allows to adjust
sleep interval for the next frame in case sleep is not precise due to syscall
overhead or too low timer resolution.

Remove old frame limiting mechanism.
2021-02-12 00:03:11 +01:00
Sergey Fukanchik
f3271cb66b Add unit test for swapEndiannessInplace(). Part of Bug #5837 2021-02-09 13:09:36 -05:00
Petr Mikheev
31b5150e0d Fix implementation of Misc::swapEndiannessInplace 2021-02-07 09:12:38 +01:00
David Cernat
e1259fdc41 Add OpenMW commits up to 4 Feb 2021
# Conflicts:
#   apps/openmw/engine.cpp
#   apps/openmw/mwmechanics/npcstats.hpp
#   apps/openmw/mwrender/globalmap.cpp
2021-02-05 02:16:03 +02:00
Petr Mikheev
14dd11372f Utility functions for little-endian <-> big-endian conversion. 2021-01-10 16:34:47 +01:00
David Cernat
7f435ceeac Add OpenMW commits up to 1 Nov 2020
# Conflicts:
#   CMakeLists.txt
#   apps/openmw/main.cpp
#   apps/openmw/mwclass/container.hpp
#   apps/openmw/mwclass/creature.hpp
#   apps/openmw/mwclass/npc.hpp
#   apps/openmw/mwdialogue/dialoguemanagerimp.hpp
#   apps/openmw/mwdialogue/journalimp.hpp
#   apps/openmw/mwgui/container.cpp
#   apps/openmw/mwgui/dialogue.hpp
#   apps/openmw/mwgui/mainmenu.cpp
#   apps/openmw/mwgui/windowmanagerimp.hpp
#   apps/openmw/mwmechanics/aiactivate.hpp
#   apps/openmw/mwmechanics/mechanicsmanagerimp.hpp
#   apps/openmw/mwscript/containerextensions.cpp
#   apps/openmw/mwscript/interpretercontext.hpp
#   components/CMakeLists.txt
2020-11-01 23:17:59 +02:00
fredzio
1357bba0a0 Use some C++17 where it makes the code more readable
Also replace boost::optional
2020-10-22 07:15:16 +02:00
Bret Curtis
82431b752d removed unnessary bits that cmake should be doing for us; replace Misc::gcd with std::gcd 2020-10-20 23:38:05 +02:00
AnyOldName3
df178ed97c Merge branch 'container-regressions' into 'master'
Fix container regressions

See merge request OpenMW/openmw!346

(cherry picked from commit b0aee6f83d4cddb0116284b197913f9687dd9cee)

95e7a22d fix container regressions
2020-10-16 22:55:10 +00:00
David Cernat
68837aaf4a Add OpenMW commits up to 15 Oct 2020
# Conflicts:
#   .travis.yml
#   CI/before_script.linux.sh
#   CMakeLists.txt
#   apps/openmw/mwgui/containeritemmodel.cpp
#   apps/openmw/mwgui/tradewindow.cpp
#   apps/openmw/mwphysics/actor.cpp
#   apps/openmw/mwworld/actionteleport.cpp
#   apps/openmw/mwworld/containerstore.cpp
2020-10-15 19:51:39 +02: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
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
David Cernat
80af0ce6a7 Add OpenMW commits up to 29 Aug 2020
# Conflicts:
#   CMakeLists.txt
#   apps/openmw/mwmechanics/character.cpp
2020-08-29 16:15:22 +02: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
David Cernat
39e429c9eb Add OpenMW commits up to 11 Jul 2020
# Conflicts:
#   .travis.yml
#   apps/openmw/mwmechanics/actors.cpp
2020-07-11 21:42:01 +02:00
elsid
02f9b44f01
Use RAII for object ptr from pool 2020-07-04 01:15:27 +02:00
elsid
6ca29c6107
Use common type for pool of sounds and streams 2020-07-04 01:09:04 +02:00
David Cernat
3b2eb6f62c Add OpenMW commits up to 22 Jun 2020
# Conflicts:
#	.travis.yml
#	CMakeLists.txt
2020-06-22 20:50:55 +03:00
Andrei Kortunov
d1a3cc98ff Get rid of ECLD and dependencies 2020-06-17 13:09:16 +04:00
elsid
c4cd3b2c4f
Add pathgrid to navmesh as off mesh connection 2020-06-12 21:04:02 +02:00
David Cernat
053a5a6258 Add OpenMW commits up to 9 May 2020
# Conflicts:
#	apps/openmw/mwmechanics/spellcasting.cpp
#	apps/openmw/mwscript/aiextensions.cpp
2020-05-09 15:17:04 +03:00
elsid
bd1ef4dd6d
Add detournavigator test for multiple worker threads 2020-04-26 22:00:55 +02:00
David Cernat
a20f8e77dc Add OpenMW commits up to 25 Apr 2020
# Conflicts:
#	.travis.yml
#	apps/openmw/mwclass/container.cpp
#	apps/openmw/mwclass/door.cpp
2020-04-25 09:52:58 +03:00
Frederic Chardon
513ac8986d Add link to opencs documentation on readthedocs, available through
context menu.
The documentation opens in default browser.

There are 3 contexts:
- global: opens the OpenMW CS User Manual main page
- when a record is selected: opens the "Tables" page
- when the filter field is selected: opens the "Record Filters" page

There is also a link to the OpenCS tutorial in the help menu.
2020-04-18 20:54:21 +00:00
David Cernat
60b6f92fa3 Add OpenMW commits up to 13 Jan 2020
# Conflicts:
#	apps/openmw/mwmechanics/actors.cpp
2020-01-15 07:49:26 +02:00
Andrei Kortunov
a250a405b4 An attempt to fix the MSVC2017 build 2020-01-09 20:42:06 +04:00
Andrei Kortunov
1cdd33b434 Implement additional stringops to avoid Boost functions 2020-01-09 19:40:22 +04:00
David Cernat
b57c0bcafe Add OpenMW commits up to 6 June 2019
# Conflicts:
#	apps/openmw/mwgui/hud.cpp
#	apps/openmw/mwgui/jailscreen.cpp
#	apps/openmw/mwgui/waitdialog.cpp
#	apps/openmw/mwinput/inputmanagerimp.cpp
#	apps/openmw/mwworld/worldimp.hpp
2019-08-22 11:42:02 +03:00