Commit Graph

113 Commits (99061345cc652d827e4a1dea9af49958ef207f6e)

Author SHA1 Message Date
Petr Mikheev 14dd11372f Utility functions for little-endian <-> big-endian conversion. 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
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
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
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
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
elsid bd1ef4dd6d
Add detournavigator test for multiple worker threads 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
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
Andrei Kortunov e679190f31 Introduce a custom format() function to get rid of boost::format() and hackish replace() 6 years ago
Andrei Kortunov 861d41f4a4 Native graphics herbalism support (feature #5010) 6 years ago
elsid ccc709a316
Store guarded navmesh cache item in shared_ptr
Remove useless SharedGuarded type.
6 years ago
Andrei Kortunov bf5f68a4d8 Replace boost GCD to the homebrew implementation 6 years ago
Grigory Latyshev 3872d7476b Move makeOsgVec3f() to settingsutils.hpp
Remove all other makeOsgVec3f() implementations
6 years ago
Grigory af7b6a09a8 Simplify Misc::StringUtils::toLower 6 years ago
elsid 33f6fb258d
Option to set specific random seed for random number generator 6 years ago
Capostrophic 8ecd0b82a4 Replace Boost format and replace_all where possible 6 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
elsid 16675fd254
Return empty path when navmesh is not found for agent 6 years ago
Andrei Kortunov 9e4a339ad3 Daytime node switch support (feature #4836) 6 years ago
elsid 264ea99af6 Use explicit default ctors call
Special change for MSVC2015.
6 years ago
elsid ed73d130f9
Cache navmesh tiles
Use LRU modification to hold currently used items. Use RecastMesh binary
data for item key.

Store original pointer of btCollisionShape in user pointer to make available
it as an identifier within all duplicates. Use pointer to heights data array
for btHeightfieldTerrainShape.
6 years ago
elsid ae7285e960
Use ScopeGuarded instead of raw mutex 6 years ago
elsid cf4066751c
Add classes to encapsulate value guarded by mutex 6 years ago
Andrei Kortunov 43c7438e8e Move WeakCache to components/misc 6 years ago
Andrei Kortunov 70ed8fd1a9 Use constants instead of widely used magic numbers (task #4645) 6 years ago
Marc Zinnschlag dc9aedca7d Merged merge request !33 6 years ago
James Carty 1c49698053 Implement 'g' flag 6 years ago
James Carty 579f35511a Add support for scietific notation flag for MessageBox 6 years ago
Andrei Kortunov 7d6e3673e0 Implement advanced logging system (feature #4581) 6 years ago
Capostrophic 348c6f848e
Fix a bunch of MSVC warnings 6 years ago
Andrei Kortunov 1f4dd3b393 Make partial binary search case insensitive, as it supposed to be (bug #4558) 7 years ago
Andrei Kortunov e2519226aa Move boost include 7 years ago
Andrei Kortunov c2a175c2e0 Move crash catcher wrapper to separate file 7 years ago
Andrei Kortunov c454f1bdad Use log file for editor (feature #4012) 7 years ago
Marc Zinnschlag 13f7b53b1c Revert "Don't force DDS file usage (fixes #1392)"
This reverts commit 90f3ff2da4.
7 years ago
Andrei Kortunov afae398b5c Use utf8 lowercase function for journal index to avoid code duplication 7 years ago
Andrei Kortunov b5374029e5 Implement case-insensitive search in spell window 7 years ago
Evgeny Kurnevsky 48fb6bb9e8
Fix crash when rollDice is called with 0. 7 years ago
scrawl 1f1f47431f
Merge pull request #1672 7 years ago
Capostrophic 48467814d4 Improve random number generation 7 years ago
Capostrophic 90f3ff2da4 Don't force DDS file usage (fixes #1392)
Fallback to a DDS file if the requested texture path doesn't point to an existing file, not vice versa
7 years ago
Andrei Kortunov 94c0e3ed10 Move toUpper() from StringUtils to the JournalViewModel 7 years ago
Andrei Kortunov 67acb83b62 Add missing include 7 years ago