1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 02:23:53 +00:00
Commit graph

347 commits

Author SHA1 Message Date
elsid
9398e97600
Avoid manual memory management for VFS archives 2022-07-16 15:30:14 +02:00
Petr Mikheev
8b8c304953 Treat empty RootCollisionNode in NIF as NCC flag and generate CameraOnly collision shape 2022-07-10 00:46:11 +02:00
elsid
bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00
elsid
e074ebde96
Fix C4389 msvc warning
'==': signed/unsigned mismatch
2022-07-01 18:47:47 +02:00
elsid
2eae3227ba
Fix C4305 msvc warning
'argument': truncation from 'double' to 'float'
2022-07-01 18:47:46 +02:00
elsid
8544aa481c
Fix C4459 msvc warning
declaration of 'navMeshVersion' hides global declaration
2022-07-01 18:47:40 +02:00
elsid
7e6c13630a Use target_precompile_headers for the most expensive headers 2022-07-01 14:05:17 +00:00
elsid
10fbf170a2
Reduce number of includes for boost/program_options 2022-06-25 18:32:10 +02:00
Alexei Kotov
e673f9fa76 Clean up NIF flags 2022-06-22 01:58:16 +03:00
elsid
1a12c453d6
Support different agent collision shape type for pathfinding
Actors may have different collision shapes. Currently there are axis-aligned
bounding boxes and rotating bounding boxes. With AABB it's required to use
bounding cylinder for navmesh agent to avoid providing paths where actor can't
pass. But for rotating bounding boxes cylinder with diameter equal to the front
face width should be used to not reduce of available paths. For example rats
have rotating bounding box as collision shape because of the difference between
front and side faces width.

* Add agent bounds to navmesh tile db cache key. This is required to distinguish
  tiles for agents with different bounds.
* Increase navmesh version because navmesh tile db cache key and data has changed.
* Move navmesh version to the code to avoid misconfiguration by users.
* Fix all places where wrong half extents were used for pathfinding.
2022-06-21 12:57:32 +02:00
Petr Mikheev
3bf18c601c Better fog 2022-06-21 02:21:20 +02:00
psi29a
9c1970dce4 Merge branch 'lua_esm' into 'master'
Advanced Lua scripts configuration in omwaddon

See merge request OpenMW/openmw!1947
2022-06-11 18:48:23 +00:00
psi29a
c7449dc272 Merge branch 'bullet_includes' into 'master'
Clean up bullet includes

See merge request OpenMW/openmw!1974
2022-06-05 10:17:57 +00:00
Petr Mikheev
a70d5831c5 Lua scripts configuration in omwaddon 2022-06-05 01:36:39 +02:00
jvoisin
72a6d1f69f Clean up bullet includes 2022-06-04 20:15:10 +02:00
elsid
3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
2022-06-03 01:29:03 +02:00
Petr Mikheev
709d186b8d Put tests output files to a separate dir 2022-05-30 01:34:23 +02:00
jvoisin
cb226e00f9 Remove some more of boost:: 2022-05-25 21:16:26 +02:00
psi29a
499e688289 Merge branch 'fix_navigator_tests' into 'master'
Increase precision error for navigator tests (#6770)

Closes #6770

See merge request OpenMW/openmw!1909
2022-05-24 17:19:43 +00:00
psi29a
a737b05d84 Merge branch 'faster_toLower' into 'master'
Improve the speed of toLower

See merge request OpenMW/openmw!1889
2022-05-24 07:53:01 +00:00
jvoisin
998f1c960e Improve the speed of toLower
This significantly improves the speed of my fuzzer,
by something like 15%.
2022-05-23 21:24:17 +02:00
elsid
87073e26f2
Increase precision error for navigator tests 2022-05-23 17:18:00 +02:00
cody glassman
6093cb5f2c postprocessing lua api extensions 2022-05-22 18:53:38 -07:00
psi29a
f17d7fc00b Merge branch 'string_view' into 'master'
Make getStringLiteral return a string_view

See merge request OpenMW/openmw!1896
2022-05-22 20:50:04 +00:00
Evil Eye
ac78b537d2 Address feedback 2022-05-22 09:29:03 +02:00
elsid
5269ba6f3c Fix warning: -Wunused-lambda-capture 2022-05-21 18:17:36 +00:00
Evil Eye
c6ca0e78c9 Make getStringLiteral return a string_view 2022-05-21 01:21:55 +02:00
psi29a
d3f331793e Merge branch 'sol' into 'master'
Update sol. Replace combined sol.hpp with loose files.

See merge request OpenMW/openmw!1851
2022-05-18 07:57:32 +00:00
ζeh Matt
18f16eac4c
Refactor DetourNavigator to pass prng along, use world prng for AiWander 2022-05-17 20:37:15 +03:00
psi29a
f092d8da9a Merge branch 'post_malone' into 'master'
Post Processing

See merge request OpenMW/openmw!1124
2022-05-16 14:51:13 +00:00
Petr Mikheev
d16fa553c8 Fix LuaUtil::Callback 2022-05-15 21:34:48 +02:00
cody glassman
04843fed6d moddable post-processing pipeline 2022-05-15 10:03:58 -07:00
elsid
a75c7c49f0
Disable writes to navmeshdb on database is locked error
Simultaneously writing to sqlite3 database is not possible. Process exclusively
locks the database for this. Another process will fail to perform any request
when database is locked. Alternatively it can wait. Handling this situation
properly requires complexity that is not really needed. Users are not expected
to run multiple openmw processes simultaneously using the same navmeshdb.

Before this change running multiple openmw processes using the same navmeshdb
can lead to a crash when first transaction fails to start because there is
exception thrown and not catched.

Remove use of explicit transactions from DbWorker. Handling all possible
transaction states due to different errors brings unnecessary complexity.
Initially they were introduced to increase time between flushes to disk. This
makes sense for navmeshtool because of massive number of writes but for the
engine this is not an issue.
2022-05-09 22:54:46 +02:00
Petr Mikheev
c7ab67c2c1 Allow relative paths in openmw.cfg; support --replace=config. 2022-04-28 00:39:41 +02:00
madsbuvi
dc3045c970 mono-only version of the shader linking system introduced in the stereo MR 2022-04-26 19:54:24 +02:00
Petr Mikheev
eae1e87081 [Lua] Update openmw.storage 2022-04-23 18:55:12 +02:00
psi29a
f99f818c0c Merge branch 'esm4_cleanup' into 'master'
ESM4 cleanup

See merge request OpenMW/openmw!1792
2022-04-23 15:27:28 +00:00
elsid
d71a1efa92
Rename components/esm4/acti.hpp -> components/esm4/loadacti.hpp 2022-04-23 00:40:45 +02:00
elsid
94c1d0cced
Use unique_ptr to store istream 2022-04-22 18:27:17 +02:00
psi29a
c14796fc57 Merge branch 'ncc' into 'master'
#6496 Handle NCC flag in Nif files

See merge request OpenMW/openmw!1516
2022-04-17 20:29:41 +00:00
fredzio
d05a2facf3 Handle NCC flag in Nif files. Objects with this flag will collide only with camera.
Expose objects with NC flag to be used by Lua mods.
2022-04-17 20:03:00 +02:00
Evil Eye
86d7f5a988 Fix tests 2022-04-16 22:58:08 +02:00
elsid
fbc853804d
Fix recover from errors in Files::getHash 2022-04-15 21:43:54 +02:00
elsid
b09570692e
Use ifstream for ESMReader
ESMReader reads the whole file, there is no need in the ConstrainedFileStream.
2022-04-15 02:58:57 +02:00
elsid
194c11f214
Fix loading order in EsmLoader
Need to load the last present record from a sequence of loaded records. That
means reverse should be called before unique or unique should be applied for
a reversed range. Since unique keeps only the first element from a sub
sequence of equal elements.

Use forEachUnique with reversed range to avoid redundant container
modifications.
2022-04-13 09:33:24 +02:00
elsid
4447ab0ed7
Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
elsid
5eb8c4aebe
Avoid redundant conversion to const char* and use make_shared 2022-04-10 22:33:08 +02:00
Benjamin Winger
21ffbcc4b4 Lua i18n updates 2022-04-10 07:57:02 +00:00
psi29a
fc5605fc7f Merge branch 'navmeshtool_binary_log' into 'master'
Send status of navmeshtool to launcher using type binary messages

See merge request OpenMW/openmw!1630
2022-04-06 23:40:45 +00:00
Matt
49e21e121a Revert "Merge branch 'refactor/6677-2' into 'master'"
This reverts merge request !1733
2022-04-04 17:09:52 +00:00