Commit Graph

156 Commits (master)

Author SHA1 Message Date
David Cernat 1f0cb09933 Add OpenMW commits up to 1 Jun 2021
# Conflicts:
#   .travis.yml
#   README.md
4 years ago
jvoisin e51669c05d Don't assign a variable passed by value 4 years ago
David Cernat 7a6dfc61ec Add OpenMW commits up to 21 May 2021
# Conflicts:
#   CMakeLists.txt
#   apps/openmw/mwscript/interpretercontext.cpp
#   components/CMakeLists.txt
4 years ago
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%.
4 years ago
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
4 years ago
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.
4 years ago
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.
4 years ago
David Cernat a3f304107b Add OpenMW commits up to 2 May 2021
# Conflicts:
#   components/CMakeLists.txt
4 years ago
Andrei Kortunov f308dde254 Clean up MSVC warnings 4 years ago
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.
4 years ago
psi29a c686dd05d0 Merge branch 'thread_idle_priority' into 'master'
Set idle priority for navmesh generation thread

See merge request OpenMW/openmw!632
4 years ago
elsid ab8d1c02d4
Set idle priority for navmesh generation thread
Support Linux, Windows, FreeBSD.
4 years ago
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
4 years ago
glassmancody.info 582f7b52cf Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 4 years ago
glassmancody.info 9e80091aff clear up force shaders and make it less convoluted 4 years ago
Andrei Kortunov 124a33d8a3 Fix uninitialized variables 4 years ago
Max 2cd96e56d5 create constant and use constant in other parts of the code base 4 years ago
psi29a 415591b7ed Merge branch 'ai_reaction_deviation' into 'master'
Distribute AI reactions and engage combat calls over time

See merge request OpenMW/openmw!674
4 years ago
wareya 63f01d8c5f Prevent physics death spiral by falling back to true delta time when needed 4 years ago
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.
4 years ago
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
4 years ago
David Cernat 7e188f2dd6 Add OpenMW commits up to 14 Feb 2021
# Conflicts:
#   apps/openmw/mwclass/door.cpp
#   apps/openmw/mwscript/aiextensions.cpp
4 years ago
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.
4 years ago
Sergey Fukanchik f3271cb66b Add unit test for swapEndiannessInplace(). Part of Bug #5837 4 years ago
Petr Mikheev 31b5150e0d Fix implementation of Misc::swapEndiannessInplace 4 years ago
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
4 years ago
Petr Mikheev 14dd11372f Utility functions for little-endian <-> big-endian conversion. 4 years ago
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
4 years ago
fredzio 1357bba0a0 Use some C++17 where it makes the code more readable
Also replace boost::optional
4 years ago
Bret Curtis 82431b752d removed unnessary bits that cmake should be doing for us; replace Misc::gcd with std::gcd 4 years ago
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
4 years ago
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
4 years ago
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.
4 years ago
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
4 years ago
David Cernat 80af0ce6a7 Add OpenMW commits up to 29 Aug 2020
# Conflicts:
#   CMakeLists.txt
#   apps/openmw/mwmechanics/character.cpp
4 years ago
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`
4 years ago
David Cernat 39e429c9eb Add OpenMW commits up to 11 Jul 2020
# Conflicts:
#   .travis.yml
#   apps/openmw/mwmechanics/actors.cpp
5 years ago
elsid 02f9b44f01
Use RAII for object ptr from pool 5 years ago
elsid 6ca29c6107
Use common type for pool of sounds and streams 5 years ago
David Cernat 3b2eb6f62c Add OpenMW commits up to 22 Jun 2020
# Conflicts:
#	.travis.yml
#	CMakeLists.txt
5 years ago
Andrei Kortunov d1a3cc98ff Get rid of ECLD and dependencies 5 years ago
elsid c4cd3b2c4f
Add pathgrid to navmesh as off mesh connection 5 years ago
David Cernat 053a5a6258 Add OpenMW commits up to 9 May 2020
# Conflicts:
#	apps/openmw/mwmechanics/spellcasting.cpp
#	apps/openmw/mwscript/aiextensions.cpp
5 years ago
elsid bd1ef4dd6d
Add detournavigator test for multiple worker threads 5 years ago
David Cernat a20f8e77dc Add OpenMW commits up to 25 Apr 2020
# Conflicts:
#	.travis.yml
#	apps/openmw/mwclass/container.cpp
#	apps/openmw/mwclass/door.cpp
5 years ago
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.
5 years ago
David Cernat 60b6f92fa3 Add OpenMW commits up to 13 Jan 2020
# Conflicts:
#	apps/openmw/mwmechanics/actors.cpp
5 years ago
Andrei Kortunov a250a405b4 An attempt to fix the MSVC2017 build 5 years ago
Andrei Kortunov 1cdd33b434 Implement additional stringops to avoid Boost functions 5 years ago
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
5 years ago