Commit Graph

55 Commits (24eb1165fcdfe9a4a6561750adac901c6d809e77)

Author SHA1 Message Date
elsid 7a7c20d49e
Define single UpdateGuard type in a separate file 2 years ago
florent.teppe 3258fa4f98 setworldspace uses serializeText 2 years ago
florent.teppe c2182c2fcc Get Rid of ESM::CellId almost everywhere
it was a competing concept from using RefIds for cell.
There is almost no point to it now, except to load older data.
2 years ago
florent.teppe c39dd576f8 Gets rid of most ESM::CellId 2 years ago
elsid 1857d8a68c
Use target_compile_options to add --coverage 2 years ago
elsid 2fcb94064d
Support RefId comparison with std::string_view 2 years ago
elsid c44bc5ade5
Setup logging with properly initialized configuration manager
Default constructed instance may provide different paths from initialized one.
2 years ago
florent.teppe 150e2ba885 Revert "Use ESM::RefId for worldspace in detournavigator"
This reverts commit b4ab153418.

# Conflicts:
#	apps/navmeshtool/worldspacedata.cpp
2 years ago
florent.teppe 3780033837 Reverts Cell name to a string 2 years ago
elsid b4ab153418
Use ESM::RefId for worldspace in detournavigator 2 years ago
florent.teppe 2c30575b3b CellName is now a RefId, makes more sense that way. 2 years ago
florent.teppe 65cdd489fb create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
Fixed some types

removed useless header

applied clang format

fixed compile tests

fixed clang tidy, and closer to logic before this MR

Removed hardcoded refids

unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string

Fix clang format

Fixed a few instances where std::string was used, when only const std::string& was needed

removed unused variable
2 years ago
fteppe 20da0892ef openMW_test_suite compiles and runs
Slowly moving through the open-cs errors

Good progress in openCS

Very good progress on openCS

Getting closer with openCS

OpenCS compiles and runs! Didn't have time to test it all though

ix openMW

everything compiles on windows??

Fix gcc

Fix Clang
2 years ago
jvoisin cd29c181cf Another pass with IWYU 2 years ago
elsid 624d8bc931
Support unsigned settings values 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid 6ae15f08e0
Avoid chained operator() calls to prevent formatting issues 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
elsid 22ee592dd3
Lock TileCachedRecastMeshManager once per changing a cell
To save time on locking mutex and prevent AsyncNavMeshUpdater to use RecastMesh
for a tile in the middle of objects loading.
2 years ago
elsid e2d566b89d
Store changed tiles in TileCachedRecastMeshManager 2 years ago
elsid 948e2f5db9
Do not use collision shapes with visual only collision to generate navmesh
These collision shapes are not used for actors movement physics simulation.
2 years ago
elsid b1fb42a28c
Cleanup detournavigator includes 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
elsid 8b8e4f78b6
Support cylinder and rotating box collision shape types for actors
Cylinder collision shape should give the best consistency between physics
simulation and pathfinding. Rotating box is already used by some actors, so
add it to have the same collision shape type for all actors.
2 years ago
elsid 7e6c13630a Use target_precompile_headers for the most expensive headers 3 years ago
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.
3 years ago
uramer fd7965d77f Use correctMeshPath instead of string constants 3 years ago
ζeh Matt d5ec959449
Create platform component for platform specific things 3 years ago
psi29a c7449dc272 Merge branch 'bullet_includes' into 'master'
Clean up bullet includes

See merge request OpenMW/openmw!1974
3 years ago
jvoisin 72a6d1f69f Clean up bullet includes 3 years ago
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.
3 years ago
elsid 92a64b0bbd
Fix typo in navmeshtool log message 3 years ago
jvoisin 0554afeb67 Remove boost::filesystem from navmashtool 3 years ago
elsid 5b592e09e6
Log more information when navmeshtool fails on not enough space 3 years ago
Petr Mikheev c7ab67c2c1 Allow relative paths in openmw.cfg; support --replace=config. 3 years ago
elsid 2d5ccc804b
Exchange binary messages between navmeshtool and launcher 3 years ago
elsid 5b9dd10cbe
Limit max navmeshdb file size
Use "pragma max_page_count" to define max allowed file size in combination with
"pragma page_size" based on a new setting "max navmeshdb file size".

* Stop navmeshtool on the first db error.
* Disable writes to db in the engine on first "database or disk is full"
  SQLite3 error. There is no special error code for this error.
* Change default "write to navmeshdb" to true.
* Use time intervals for transaction duration instead of number of changes.
3 years ago
elsid 42d6032c8b
Support compilation with c++20 3 years ago
elsid ab1a6e034e
Add navmeshtool flag to remove unused tiles from navmesh disk cache
* Remove tiles outside processing range. Useful when new content profile map
  has different bounds.
* Remove ignored tiles. For a case when content profile maps have intersection
  but there is no more data for navmesh.
* Remove older tiles at the same worldspace position. If navmesh tile data has
  changed with new content, the old ones unlikely to be used.
* Vacuum the database when there are modifications. SQLite leaves empty pages
  in the file on database modification. Vacuum cleans up unused pages reducing
  the file size.
3 years ago
elsid 67741402b5
Replace reference to const std::string by std::string_view for navmeshdb related arguments 3 years ago
elsid 2e38f0b641
Fix btAABB initialization 3 years ago
psi29a becffef142 Merge branch 'cull_navmesh_objects' into 'master'
Cull navmesh objects by scene bounds (#5858)

Closes #5858

See merge request OpenMW/openmw!1625
3 years ago
elsid 05b54cbfb8
Cull navmesh objects by scene bounds
If object is too big iteration over all tiles covering it can take too much
time. Limit bounds to a square around a player position to cover only tiles
that will be present in navmesh based on max tiles number option.

Each object is associated with a set of tiles its present in. Culling can
reduce this set but it has to be update when bounds change position. Do this
in TileCachedRecastMeshManager::setBounds updating the set and adding/removing
objects to the corresponding CachedRecastMeshManagers.
3 years ago
elsid 1b2954f2db
Remove unused z coordinate 3 years ago
Petr Mikheev a453e5c198 Reuse the same code to load settings in apps/openmw, apps/launcher, apps/opencs 3 years ago
Petr Mikheev 5ca56a4f8a New option "config" for specifying additional config directories. 3 years ago
psi29a 6f7a067e0c Merge branch 'esmrename' into 'master'
esm refactor work

See merge request OpenMW/openmw!1575
3 years ago
elsid ecc654a369 Limit and filter navmesh input (#5858) 3 years ago
Bret Curtis 74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
3 years ago