1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:59:57 +00:00
Commit graph

325 commits

Author SHA1 Message Date
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
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
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
Petr Mikheev
14dd11372f Utility functions for little-endian <-> big-endian conversion. 2021-01-10 16:34:47 +01: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
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
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
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
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
elsid
bd1ef4dd6d
Add detournavigator test for multiple worker threads 2020-04-26 22:00:55 +02: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
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
Andrei Kortunov
e679190f31 Introduce a custom format() function to get rid of boost::format() and hackish replace() 2019-05-20 09:20:01 +04:00
Andrei Kortunov
861d41f4a4 Native graphics herbalism support (feature #5010) 2019-05-02 23:03:47 +04:00
elsid
ccc709a316
Store guarded navmesh cache item in shared_ptr
Remove useless SharedGuarded type.
2019-03-10 17:06:19 +03:00
Andrei Kortunov
bf5f68a4d8 Replace boost GCD to the homebrew implementation 2019-03-02 17:32:05 +04:00
Grigory Latyshev
3872d7476b Move makeOsgVec3f() to settingsutils.hpp
Remove all other makeOsgVec3f() implementations
2019-02-28 20:03:42 +00:00
Grigory
af7b6a09a8 Simplify Misc::StringUtils::toLower 2019-02-28 00:24:43 +03:00
elsid
33f6fb258d
Option to set specific random seed for random number generator 2019-02-26 09:36:34 +03:00
Capostrophic
8ecd0b82a4 Replace Boost format and replace_all where possible 2019-02-24 03:20:20 +03:00
Andrei Kortunov
3032b177a1 Remove redundant includes 2019-02-23 08:02:12 +04:00
elsid
16675fd254
Return empty path when navmesh is not found for agent 2019-02-16 15:37:06 +03:00
Andrei Kortunov
9e4a339ad3 Daytime node switch support (feature #4836) 2019-02-02 10:50:15 +04:00
elsid
264ea99af6 Use explicit default ctors call
Special change for MSVC2015.
2018-11-02 10:35:57 +03:00
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.
2018-10-13 22:22:12 +03:00
elsid
ae7285e960
Use ScopeGuarded instead of raw mutex 2018-10-13 22:16:35 +03:00
elsid
cf4066751c
Add classes to encapsulate value guarded by mutex 2018-10-13 22:16:35 +03:00
Andrei Kortunov
43c7438e8e Move WeakCache to components/misc 2018-09-28 16:47:47 +04:00
Andrei Kortunov
70ed8fd1a9 Use constants instead of widely used magic numbers (task #4645) 2018-09-17 19:22:50 +04:00
Marc Zinnschlag
dc9aedca7d Merged merge request !33 2018-08-18 12:08:05 +02:00
James Carty
1c49698053 Implement 'g' flag 2018-08-13 20:31:11 +01:00
James Carty
579f35511a Add support for scietific notation flag for MessageBox 2018-08-12 22:45:03 +01:00
Andrei Kortunov
7d6e3673e0 Implement advanced logging system (feature #4581) 2018-08-12 13:38:15 +04:00
Capostrophic
348c6f848e
Fix a bunch of MSVC warnings 2018-08-09 02:27:33 +03:00
Andrei Kortunov
1f4dd3b393 Make partial binary search case insensitive, as it supposed to be (bug #4558) 2018-08-05 13:26:12 +04:00
Andrei Kortunov
e2519226aa Move boost include 2018-08-03 17:04:07 +04:00
Andrei Kortunov
c2a175c2e0 Move crash catcher wrapper to separate file 2018-08-03 15:51:17 +04:00
Andrei Kortunov
c454f1bdad Use log file for editor (feature #4012) 2018-08-03 09:05:08 +04:00
Marc Zinnschlag
13f7b53b1c Revert "Don't force DDS file usage (fixes #1392)"
This reverts commit 90f3ff2da4.
2018-06-04 17:08:09 +02:00
Andrei Kortunov
afae398b5c Use utf8 lowercase function for journal index to avoid code duplication 2018-05-24 12:53:06 +04:00
Andrei Kortunov
b5374029e5 Implement case-insensitive search in spell window 2018-05-24 12:39:00 +04:00
Evgeny Kurnevsky
48fb6bb9e8
Fix crash when rollDice is called with 0. 2018-04-21 16:46:36 +03:00
scrawl
1f1f47431f
Merge pull request #1672 2018-04-19 13:36:40 +00:00
Capostrophic
48467814d4 Improve random number generation 2018-04-19 15:55:26 +03:00
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
2018-04-18 17:55:12 +03:00
Andrei Kortunov
94c0e3ed10 Move toUpper() from StringUtils to the JournalViewModel 2017-11-23 19:37:45 +04:00
Andrei Kortunov
67acb83b62 Add missing include 2017-11-21 13:27:33 +04:00
Andrei Kortunov
5f41f7c48d Clean code up a bit 2017-11-21 13:03:38 +04:00
Andrei Kortunov
ba91cd658b Convert topic name to Unicode 2017-11-21 12:31:23 +04:00
Andrei Kortunov
f0ca3eabd3 Merge from upstream master 2017-11-21 09:39:54 +04:00
Andrei Kortunov
a391990f2a Provide multibyte toLower() and single chars comparator 2017-11-20 21:30:46 +04:00
Alexander Stillich
43b5c2e36b Fixed parameter naming 2017-11-07 23:20:10 +01:00
Alexander Stillich
af3e1f92ec Added StringUtil::replaceAll() 2017-11-07 23:06:23 +01:00
Andrei Kortunov
4bb349a525 Use default 0 precision in the float formatting (bug #4096) 2017-09-17 15:07:04 +04:00
Bret Curtis
b7c27e5e96 remove boost/tuple 2017-06-09 19:08:53 +02:00
scrawl
813af876f6 Use a partial binary search in isReservedName (Fixes #3835) 2017-05-07 23:28:56 +02:00
MiroslavR
c962b6dd6d Fix correctActorModelPath to work properly when both backward and forward slashes are used in the path (Fixes #3822) 2017-04-09 18:34:36 +02:00
scrawl
1d6b5b2a52 Add StringUtils::CiComp operator 2017-02-23 23:28:50 +01:00
Allofich
8c5aae0722 Add virtual destructors 2016-08-21 18:31:46 +09:00
MiroslavR
f6f3f71db5 Improve format specifiers for message boxes 2016-07-09 03:18:45 +02:00
scrawl
07b064f616 Rename to lowerCaseInPlace 2015-12-07 22:49:15 +01:00
scrawl
e3d3380c8c Remove return value for in-place toLowerStr 2015-12-07 22:43:08 +01:00
scrawl
42d68eb7fb Build fix 2015-12-07 22:29:57 +01:00
scrawl
f875597be5 Don't use tolower()
See https://forum.openmw.org/viewtopic.php?f=8&t=3231&p=35968
2015-12-07 21:58:30 +01:00
scrawl
27e669296e StringUtils: use the locale-unaware tolower function
There is no change in behaviour since we were using the C locale.

The locale-aware tolower is much slower than the locale-unaware one. At least on Linux/GCC it calls dynamic_cast's, and is overall slower by an order of magnitude.
2015-11-27 03:22:52 +01:00
scrawl
82c4d01b37 Add back resource handling workarounds to the gui code 2015-05-01 18:37:24 +02:00
scrawl
6fada6acf8 Remove tests for no longer existing code 2015-04-23 20:02:18 +02:00
scrawl
8c810e3620 Move rng to components 2015-04-22 17:58:55 +02:00
scrawl
79c2138e53 Port ResourceHelpers to new VFS 2015-03-19 01:45:01 +01:00
scrawl
41b3a9dba9 Rewrite animated collision shape support (Fixes #2123) 2015-01-13 05:37:37 +01:00
scrawl
efbc8742a0 Remove some unnecessary includes 2015-01-09 21:13:57 +01:00
scrawl
4a734f5cd3 Fall back to top-level directory when looking for resources (Fixes #2169) 2015-01-03 19:10:15 +01:00
Rohit Nirmal
e315a72582 Remove extra semicolons at the end of some lines. 2014-09-06 13:04:52 -05:00
MiroslavR
baa14511cf Use ResourceHelpers to replace DDS hacks scattered throughout the code, fix prefix comparision 2014-08-12 12:18:38 +02:00
MiroslavR
4d403ed747 Rename and move functions for texture path correction 2014-08-11 20:04:44 +02:00
scrawl
41d73377b0 Use explicit C locale in Misc::StringUtils (Fixes #1216) 2014-07-12 18:53:22 +02:00
scrawl
262e959699 Remove unused slice_array 2014-04-20 19:28:39 +02:00
Lukasz Gromanowski
9b73d23139 Fix warning about uninitialized variable inside stream.peak():
openmw/mwgui/bookpage.cpp:394:13: warning: ‘*((void*)& stream +24)’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-12-28 13:55:54 +01:00
Chris Robinson
6fd4cdb5fb Play randomized werewolf sounds 2013-08-11 00:53:17 -07:00
scrawl
3c68c87923 Fix some naming guidelines, fix topic index exception, fix exception in keyword search for some journal entries 2013-05-01 10:28:59 +02:00
Nathan Jeffords
c7ede9b523 port code to C++03 2013-04-24 20:22:57 -07:00
Nathan Jeffords
6e7c9ebbe6 fix for gcc not handling static constant initialized in class definition 2013-04-24 20:22:57 -07:00
Nathan Jeffords
75757cb675 Created a class to represent a stream of UTF8 characters. 2013-04-24 20:20:00 -07:00
Nathan Jeffords
7228f5d696 added missing reference to <cctype>
added missing reference to <cctype> that was causing Visual Studio 2010
to fail to compile stringops.hpp
2013-01-01 10:58:30 -08:00
eduard
69d9d22579 comparestring 2012-12-30 19:56:38 +01:00
eduard
98103e15eb conflict resolution 2012-12-30 13:46:07 +01:00
eduard
c85400b809 Merge https://github.com/zinnschlag/openmw into comparestring
Conflicts:
	apps/openmw/mwdialogue/dialoguemanagerimp.cpp
	apps/openmw/mwworld/worldimp.cpp
	components/esm_store/reclists.hpp
	components/misc/stringops.hpp
2012-12-30 13:09:37 +01:00
eduard
c75a5ae212 string compare and tolower 2012-12-28 18:05:52 +01:00
eduard
8545667bbd string compare and tolower 2012-12-28 17:54:56 +01:00
lazydev
74ae479780 Cell names localization fix 2012-12-23 23:23:24 +04:00
guidoj
a021165d9f Changed standard C lib includes to C++ format 2012-07-17 09:44:24 +02:00
guidoj
0549e949ba Mostly removal of unnecessary #include's and a little clean up 2012-07-17 09:27:12 +02:00
Lukasz Gromanowski
ea7eb7a62d fixes #128 Configuration cleanup.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2011-08-19 21:06:09 +02:00
Lukasz Gromanowski
514b55766f Mantis: #18 - Move components from global namespace into their own namespace.
Updated components/misc tests.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2011-06-19 18:25:09 +02:00
Lukasz Gromanowski
90985e849e Mantis: #18 - Move components from global namespace into their own namespace.
Moving classes from components/misc into Misc namespace.

Note: Misc namespace introduced conflict with ESM::Misc and MWClass::Misc
classes, so both of them are renamed to ESM::Miscellaneous
and MWClass::Miscellaneous.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2011-06-19 18:14:03 +02:00
Nikolay Kasyanov
3552ad045d Removed obsolete macBundlePath function from fileops.cpp. Using Ogre::macBundlePath 2011-03-09 21:54:01 +03:00
Marc Zinnschlag
ecfe57caf2 platform check fix 2011-03-09 18:50:24 +01:00
Nikolay Kasyanov
4028600768 Builds on OS X now 2011-03-07 05:09:29 +03:00
Pieter van der Kloet
dd4d022301 Converted all tabs to four spaces 2011-01-05 22:18:21 +01:00
Nicolay Korslund
e30306f7c3 Removed redundant custom exception class 2010-09-02 22:30:39 +02:00
Nicolay Korslund
532ccbd1f8 Killed clientconsole, mwcompiler, mwinterpreter and command server 2010-07-22 14:15:02 +02:00
Nicolay Korslund
b97def39b3 Minor fixes to Mac stuff 2010-07-07 10:07:15 +02:00
Ardekantur
ee6c933156 Merge branch 'master' of git://github.com/korslund/openmw
Conflicts:
	CMakeLists.txt
	apps/openmw/main.cpp
	game/engine.cpp
2010-07-04 17:16:57 -04:00
athile
450542b4b9 Fix Windows line feeds and chdmod 2010-07-02 00:05:57 -07:00
athile
7cc27d9b66 Add command output string and client/server response. 2010-07-01 15:50:24 -07:00
athile
7357ea2102 Add simple external console server/client 2010-07-01 11:49:00 -07:00
athile
97feee6cb6 Move misc files back to components 2010-06-28 12:40:39 -07:00
athile
67f89f27a2 Properly removing the old 'misc' file and fixing a minor error in the platform CMake 2010-06-27 18:12:31 -07:00
athile
b2485e8a52 Windows build fixes 2010-06-27 14:43:07 -07:00
Marc Zinnschlag
e4f85cb3e6 directory structure reorganisation (still missing the mangle stuff) 2010-06-25 22:28:59 +02:00