psi29a
a332dec681
Merge branch 'fix_esm_loader' into 'master'
...
Load only supported content formats by EsmLoader
See merge request OpenMW/openmw!1427
2021-11-30 15:51:22 +00:00
psi29a
a15cc0959f
Merge branch 'murmur_hash' into 'master'
...
Use MurmurHash3_x64_128 for Files::getHash
See merge request OpenMW/openmw!1404
2021-11-30 15:50:11 +00:00
AnyOldName3
bc4b54157b
Remove commented-out test conditions
2021-11-28 20:30:16 +00:00
elsid
da0c5b54f0
Load only supported content formats by EsmLoader
2021-11-22 20:58:48 +01:00
AnyOldName3
84d6de3eba
Parse paths with boost rules when it's quoted, but use the string verbatim when it's not
2021-11-21 19:51:02 +00:00
elsid
6b7363bd59
Replace generation and revision by version
2021-11-21 17:40:54 +01:00
elsid
a665a38aca
Use MurmurHash3_x64_128 for file hash
2021-11-21 17:05:59 +01:00
Petr Mikheev
f9136d4392
Support multiple arguments in Lua callbacks.
2021-11-21 13:12:35 +01:00
Petr Mikheev
d5ca091d6e
Make util.rotateX, util.rotateY, rotate.Z consistent with morrowind rotation
2021-11-19 20:37:21 +01:00
uramer
68963538ae
Lua UI API
2021-11-18 15:19:54 +00:00
AnyOldName3
8fb0b5846e
Allow paths with trailing data, emmitting a warning
2021-11-14 00:22:44 +00:00
Alexei Kotov
49544cf7de
Merge branch 'no_one_likes_commas' into 'master'
...
Treat commas in scripts as whitespace
Closes #6380
See merge request OpenMW/openmw!1388
2021-11-13 17:19:22 +00:00
psi29a
41bd20e358
Merge branch 'bullet_shape_hash' into 'master'
...
Store BulletShape source file name and content hash
See merge request OpenMW/openmw!1379
2021-11-13 13:33:22 +00:00
Evil Eye
bee94e2afc
Treat commas in scripts as whitespace
2021-11-13 14:06:21 +01:00
elsid
d7041613ef
Store BulletShape source file name and content hash
2021-11-11 00:27:18 +01:00
Cédric Mocquillon
512d64e514
Extract correctSoundPath method to avoid code duplication. Add unit test for the new method
2021-11-10 23:06:35 +01:00
elsid
9f808fbe3a
Move findPath-like navigator functions into a separate header
2021-11-06 00:34:06 +01:00
Bo Svensson
1960e976e2
refactors stringops.hpp ( #3192 )
...
With this PR we refactor `StringUtils::replaceAll` to accept `string_view` as suggested in a code comment. In addition, while we are touching this rebuild happy file, we slim it down a bit by moving a few sparingly used functions elsewhere.
2021-11-05 10:53:52 +01:00
Bo Svensson
4657c655b1
refactors parentFileIndices ( #3211 )
...
This PR aims to start addressing `ESM` design issues that have silenced errors we incorporated into groundcover `ESM` loading approaches.
- We move the resolution of `parentFileIndices` from `ESMStore` to `ESMReader` as suggested in a `TODO` comment.
- We improve a highly misleading comment which downplayed the significance of `parentFileIndices`.
- We document important preconditions.
- We move a user facing error message to the highest level and improve its context.
- We remove an inappropriate `setGlobalReaderList` method. We now pass this reader list into the method that requires it.
- We remove a thoroughly pointless optimisation of `Store<ESM::LandTexture>`'s construction that has unnecessarily depended on `getGlobalReaderList`.
There should be no functional changes for `master`, but this PR should remove an issue blocking PR #3208 .
2021-11-03 11:07:28 +01:00
elsid
2b057f5c15
Expect nif node children to have parent
2021-11-02 22:44:33 +01:00
elsid
4e8e8304aa
Avoid mesh allocation when data is invalid
2021-11-02 22:44:33 +01:00
elsid
4631d95739
Add more tests for BulletNifLoader
2021-11-02 22:44:32 +01:00
psi29a
523289c531
Merge branch 'refactor_bullet_shape' into 'master'
...
Refactor bullet shape
See merge request OpenMW/openmw!1333
2021-11-02 20:30:22 +00:00
Evil Eye
ae08f942d5
Test binary operators
2021-10-30 12:23:14 +02:00
Evil Eye
3c5a50cf90
Add issues from Redmine
2021-10-30 12:09:02 +02:00
Evil Eye
319d30fb85
Add AddTopic testing
2021-10-30 10:42:11 +02:00
Evil Eye
b3208f4066
Add more issues and a forum thread
2021-10-30 10:42:10 +02:00
Evil Eye
8e0dfe3a8a
Add tests for more issues
2021-10-30 10:42:10 +02:00
Evil Eye
b2cdbe2e61
Add tests for certain issues
2021-10-30 10:42:10 +02:00
Evil Eye
3dada0796a
Validate integer math
2021-10-30 10:42:10 +02:00
Evil Eye
f027acf575
Move boilerplate to separate file
2021-10-30 10:42:09 +02:00
Evil Eye
be759e576a
Be sure to verify the opcode got executed
2021-10-30 10:42:09 +02:00
Evil Eye
6ad8549163
Allow validation of constant arguments
2021-10-30 10:42:09 +02:00
Evil Eye
e1ac871672
Start adding compiler tests
2021-10-30 10:42:08 +02:00
elsid
8e71c246bf
Remove redundant BulletShape getters
2021-10-30 03:44:08 +02:00
elsid
b905dd17c3
Use unique_ptr to store btCollisionShape in BulletShape
2021-10-30 03:44:07 +02:00
elsid
29a772c33f
Rename Resource::BulletShape::CollisionBox fields according to styleguide
2021-10-29 21:05:58 +02:00
Petr Mikheev
47c89567fb
Load LuaScriptsCfg from both *.omwscripts and *.omwaddon files.
2021-10-26 21:52:42 +02:00
Petr Mikheev
9adc190209
Redesign LuaUtil::ScriptsContainer to work with ScriptsConfiguration
2021-10-26 21:32:48 +02:00
Petr Mikheev
33d71be81f
Add LuaUtil::ScriptsConfiguration
2021-10-26 21:32:02 +02:00
elsid
a58f1a94e3
Add helpers for binary serialization
...
To construct serializer from given entities:
* Data source/destination - any value that has to be serialized/deserialized,
usually already existing type.
* Format - functional object to define high level serialization logic to
define specific format and data schema. Like order of fields, allocation.
* Visitor - functional object to define low level serialization logic to
operator on given data part.
* BinaryWriter - copies given value into provided buffer.
* BinaryReader - copies value into given destination from provided buffer.
* SizeAccumulator - calculates required buffer size for given data.
2021-10-24 14:20:44 +02:00
psi29a
1ffa02b2fd
Merge branch 'fix_windows_tests' into 'master'
...
Fix tests on windows
See merge request OpenMW/openmw!1313
2021-10-22 12:35:10 +00:00
elsid
b5f0057ac9
Fix tests on windows
2021-10-21 19:48:31 +02:00
elsid
a3b6bc7263
Fix logic expression for not found value
2021-10-20 17:48:10 +02:00
elsid
e5413c0664
Add functions to compress/decompress vector of bytes
2021-10-18 20:46:22 +02:00
Petr Mikheev
17f7a1a2ea
Merge branch 'fix_lua_test' into 'master'
...
Fix LuaUtilPackageTest.Transform
See merge request OpenMW/openmw!1302
2021-10-18 07:16:10 +00:00
elsid
bb26ba30b6
Add progress reporter type
...
To log/report progress of long duration operations using given time period.
2021-10-18 01:26:10 +02:00
AnyOldName3
9be606a40d
Finish removing old Escape classes
2021-10-17 23:40:34 +01:00
elsid
23026caacc
Fix LuaUtilPackageTest.Transform
...
It can fail due to float arithmetic precision with error:
Expected equality of these values:
getAsString(lua, "moveAndScale")
Which is: "TransformM{ move(6, 22, 18) scale(0.5, 1, 0.5) rotation(angle=8.53284e-17, axis=(1, 0, 0)) }"
"TransformM{ move(6, 22, 18) scale(0.5, 1, 0.5) }"
2021-10-17 22:47:18 +02:00
elsid
046b5f83ee
Add ESM data loader
...
A component to load ESM content files with limited support for record types and
selection which of them to load. Supported record types are:
ACTI, CELL, CONT, DOOR, GMST, LAND, STAT.
2021-10-17 19:55:29 +02:00
elsid
c88367b6a6
Add sqlite3 helpers
2021-10-16 17:43:08 +02:00
AnyOldName3
18869c2c75
Add some extra tests
...
The behaviour here is unchanged, but was previously untested.
2021-10-11 00:02:33 +01:00
AnyOldName3
7fb5b773dd
Remove obsolete tests
...
The old behaviour was basically a bug and @ doesn't mean anything special now
2021-10-11 00:01:58 +01:00
AnyOldName3
1b83b08d80
Merge remote-tracking branch 'upstream/master' into detain-hash
...
Tests which no longer work are commented out.
Some of these don't work because they're effectively testing for the
presence of bugs in the old implementation.
Others don't work because we're no longer accidentally disabling the
boost::program_options feature where it generates an error if only part
of a token gets consumed.
These will be fixed by later commits.
2021-10-10 23:50:50 +01:00
AnyOldName3
af0d399103
Purge all uses of Escape Hash types
2021-10-09 01:49:08 +01:00
psi29a
ae31138686
Merge branch 'options_tests' into 'master'
...
Add tests for openmw options
See merge request OpenMW/openmw!1253
2021-10-08 08:02:40 +00:00
florent teppe
e5abadc234
Fix keyword search when the keyword is preceded by a non whitespace non alpha character
2021-10-07 13:26:40 +00:00
elsid
035307b012
Add tests for openmw options
...
In attempt to document current behaviour. Add commented out checks as desired
behaviour.
2021-10-05 22:51:12 +02:00
Petr Mikheev
48538d5cef
3D transforms in Lua
2021-09-28 20:37:47 +02:00
Evil Eye
2f4df12b2e
Merge branch 'Fix_ASCII' into 'master'
...
Fixed an issue where keyword search expected the text to be all ASCII characters
See merge request OpenMW/openmw!1227
2021-09-26 20:08:55 +00:00
florent.teppe
2d32954888
Replaced Assert_true with expect_eq
2021-09-20 19:56:47 +02:00
florent.teppe
0e06e9b221
Removed useless comment and converted the file to UTF8 to keep special characters
2021-09-19 20:31:22 +02:00
florent.teppe
c1c501ca35
Added test to make sure keyword search works even with non ascii characters
2021-09-19 15:05:48 +02:00
Petr Mikheev
2f25257a3e
Move LuaState::makeReadOnly(sol::table) out of the class because it doesn't need to access LuaState internals.
2021-09-19 14:38:27 +02:00
elsid
6b7434ca69
Pass std::string_view instead of const std::string&
...
* Starting with Actor::getBodyPartMesh and ending with
Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
2021-09-09 18:39:50 +02:00
Petr Mikheev
33d4d88447
Function LuaUtil::toString
2021-08-31 09:41:58 +02:00
elsid
fea4fb6e69
Make AiPursue path destination to be as close as possible to target
...
Even when target is not reachable actor will try to run there either because
target navmesh polygon is selected within extended area or because partial path
is built to the closest possible polygon.
2021-08-18 23:44:36 +02:00
psi29a
6595c731f7
Merge branch 'fix_rc_poly_mesh_flags_length' into 'master'
...
Fix flags length for rcPolyMesh
See merge request OpenMW/openmw!1134
2021-08-17 09:19:32 +00:00
elsid
54a676f2e3
Add functions to get length of recast type arrays
...
To avoid duplicating same formulas in multiple places.
2021-08-12 22:43:01 +02:00
elsid
05258ed644
Remove redundant TileCachedRecastMeshManager::hasTile function
...
It's used only for tests. getMesh is a valid replacement.
2021-08-12 22:40:06 +02:00
psi29a
e10e9c0005
Merge branch 'navmesh_reduce_lock_wait' into 'master'
...
Reduce waiting duration on locks when updating navmesh object in the main thread (#6193 )
Closes #6193
See merge request OpenMW/openmw!1079
2021-08-03 23:05:39 +00:00
Petr Mikheev
3ce5e9e680
Improve error messages in components/lua/serialization.cpp
2021-08-03 16:42:26 +03:00
elsid
c8987bda2f
Store reference to BulletShapeInstance for btCollisionShape
...
To keep btCollisionShape lifetime.
2021-08-03 12:21:56 +02:00
elsid
4574e5f565
Remove redundant Navigator API functions
2021-08-03 12:21:55 +02:00
elsid
9a5ec5fd03
Store heightfields as array of heights instead of triangles
...
To reduce size of RecastMesh and therefore cache size.
2021-07-26 00:22:21 +02:00
elsid
fdee9db20c
Consider RecastMeshManager not empty when there is water
2021-07-26 00:22:21 +02:00
elsid
5d6c93566d
Rename DetourNavigator::Water -> Cell
2021-07-26 00:22:21 +02:00
elsid
753767d6d9
Store only water shift
...
Rotation is not used.
2021-07-26 00:22:20 +02:00
elsid
a1549321d7
Move Water struct out of RecastMesh class
2021-07-26 00:22:20 +02:00
elsid
d60edb36aa
Make RecastMesh independent from recast scale factor
...
To avoid scaling until it's required by delaying coordinates conversion until
navmesh generation.
2021-07-26 00:22:20 +02:00
elsid
af7059373c
Make RecastMesh independent from the order of RecastMeshBuilder calls
...
To make sure RecastMesh objects are equal if built with the same data but in
different order. Will be used later when there will be more than one place
building RecasMesh objects.
2021-07-26 00:22:20 +02:00
elsid
f92843e3d2
Fix UB: reference binding to misaligned address in Lua tests
...
/home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:166:34: runtime error: reference binding to misaligned address 0x562ea892076c for type 'const struct TestStruct1', which requires 8 byte alignment
0x562ea892076c: note: pointer points here
00 74 73 31 00 00 00 00 00 00 f8 3f 00 00 00 00 00 00 04 40 21 79 4b 08 00 00 00 74 65 73 74 5f
^
#0 0x562ea6462b8e in deserialize /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:166
#1 0x562ea68b7402 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:172
#2 0x562ea68b7bf6 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:204
#3 0x562ea68b86ea in LuaUtil::deserialize(sol::state&, std::basic_string_view<char, std::char_traits<char> >, LuaUtil::UserdataSerializer const*) /home/elsid/dev/openmw/components/lua/serialization.cpp:251
#4 0x562ea6464d96 in TestBody /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:197
#5 0x562ea6d9dac6 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
#6 0x562ea6d9dac6 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
#7 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2682
#8 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2672
#9 0x562ea6d93024 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2861
#10 0x562ea6d93728 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2834
#11 0x562ea6d93728 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:3015
#12 0x562ea6d94142 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2994
#13 0x562ea6d94142 in testing::internal::UnitTestImpl::RunAllTests() /home/elsid/dev/googletest/googletest/src/gtest.cc:5855
#14 0x562ea6d9e096 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
#15 0x562ea6d9e096 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
#16 0x562ea6d93140 in testing::UnitTest::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:5438
#17 0x562ea5d3fdc6 in RUN_ALL_TESTS() /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:2490
#18 0x562ea5d3fc6f in main /home/elsid/dev/openmw/apps/openmw_test_suite/openmw_test_suite.cpp:11
#19 0x7fe3938d0b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
#20 0x562ea5d3fb7d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw_test_suite+0x173eb7d)
/home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:176:34: runtime error: reference binding to misaligned address 0x562ea892078f for type 'const struct TestStruct2', which requires 4 byte alignment
0x562ea892078f: note: pointer points here
75 63 74 32 04 00 00 00 03 00 00 00 04 00 6e 64 69 74 69 6f 6e 73 00 73 68 61 70 65 00 51 00 00
^
#0 0x562ea6462df9 in deserialize /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:176
#1 0x562ea68b7402 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:172
#2 0x562ea68b7bf6 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:204
#3 0x562ea68b86ea in LuaUtil::deserialize(sol::state&, std::basic_string_view<char, std::char_traits<char> >, LuaUtil::UserdataSerializer const*) /home/elsid/dev/openmw/components/lua/serialization.cpp:251
#4 0x562ea6464d96 in TestBody /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:197
#5 0x562ea6d9dac6 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
#6 0x562ea6d9dac6 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
#7 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2682
#8 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2672
#9 0x562ea6d93024 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2861
#10 0x562ea6d93728 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2834
#11 0x562ea6d93728 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:3015
#12 0x562ea6d94142 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2994
#13 0x562ea6d94142 in testing::internal::UnitTestImpl::RunAllTests() /home/elsid/dev/googletest/googletest/src/gtest.cc:5855
#14 0x562ea6d9e096 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
#15 0x562ea6d9e096 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
#16 0x562ea6d93140 in testing::UnitTest::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:5438
#17 0x562ea5d3fdc6 in RUN_ALL_TESTS() /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:2490
#18 0x562ea5d3fc6f in main /home/elsid/dev/openmw/apps/openmw_test_suite/openmw_test_suite.cpp:11
#19 0x7fe3938d0b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
#20 0x562ea5d3fb7d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw_test_suite+0x173eb7d)
2021-07-17 17:41:41 +02:00
elsid
beeb882ea8
Do not use off mesh connections as a part of navmesh cache key
...
To reduce cache size and make it more flexible.
Adding off mesh connections to the navmesh is the last step of navmesh
generation and it's very fast comparing to other steps (microseconds vs
milliseconds). Having less cache size makes get and set operations almost 2x
times faster that also have an order of microseconds. So in total there is
no performance impact.
2021-07-14 12:19:17 +02:00
Petr Mikheev
702eb19271
Fixes and refactoring
2021-07-09 20:48:54 +02:00
Petr Mikheev
b53667d555
Queries. Data structures and lua bindings.
2021-07-09 20:03:27 +02:00
Petr Mikheev
479856f812
Add components/lua/scriptscontainer and components/esm/luascripts
2021-07-09 20:03:27 +02:00
Petr Mikheev
8dbaf6022c
Add components/lua/serilalization
2021-07-09 20:03:27 +02:00
Petr Mikheev
4b068b27ca
Add components/lua/luastate and components/lua/utilpackage
2021-07-09 20:03:27 +02:00
elsid
09f9075842
Use RecastMeshBuilder once to create RecastMesh
...
This allows to move all data out of the object instead of copying.
2021-07-04 22:18:05 +02:00
elsid
84d6dea277
Inscribe physical bounding box into navmesh agent cylinder
...
To disallow too narrow navmesh for a bounding box.
2021-06-27 13:44:38 +02:00
elsid
e9433a91fb
Add more tests for TileCachedRecastMeshManager
2021-05-27 20:18:52 +02:00
elsid
d122e184cc
Report navmesh change for not posted tiles
...
Corresponding recast mesh tiles can be updated but navmesh tiles may never
appear for them. Report back zero navmesh version to allow oscillating recast
objects detection to work. This version is always less than any generated
navmesh tile version so any report for generated navmesh will override it.
If zero navmesh version is reported after recast mesh tile got report about
generated navmesh tile it is a no-op since generated version is always greater
than zero.
2021-05-27 12:40:00 +02:00
elsid
105cd5b06f
Add more checks to NavMeshTilesCache tests
2021-05-21 19:33:42 +02:00
psi29a
e9fbd76e9b
Merge branch 'windows_tests' into 'master'
...
Support running tests and benchmarks for windows
See merge request OpenMW/openmw!839
2021-05-18 08:12:22 +00:00
elsid
3ef1b27099
Add missing includes
2021-05-18 01:21:42 +02:00
elsid
59f89d22f8
Apply min distance only for not present tiles
...
To avoid waiting when navmesh update is triggered by transformed object for
already present tiles.
2021-05-14 22:41:11 +02:00
elsid
7a51d0db18
Wait until navmesh is generated within given distance around player
...
Add a setting to change this distance.
To prevent situations when there is not enough navmesh generated and actors
can't find path correctly.
2021-05-05 19:44:16 +02:00
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.
2021-05-05 19:27:49 +02:00
elsid
ec87b3f8f7
Remove redundant ChunkyTriMesh
...
This AABB tree required when need to filter out input mesh that has not
influence navmesh tile output. This filtering is already done before. Each
recast mesh corresponds to a single navmesh tile and has appropriate bounds.
2021-05-04 13:00:06 +02:00
psi29a
16bb3919d1
Merge branch 'navmesh_cache_simplification' into 'master'
...
Simplify navmesh cache
See merge request OpenMW/openmw!691
2021-04-28 08:01:06 +00:00
elsid
3e67f5ffa5
Detect and ignore updates for oscillating objects
...
To avoid triggering NavMesh update when RecastMesh change should not change
NavMesh.
Based on the following assumption:
Given a set of transformations and a bounding shape for all these
tranformations, a new object transformation that does not change this
bounding shape also should not change navmesh if for all of this object
transformations resulting navmesh tiles are equivalent
The idea is to report back to RecastMeshManager all changes of NavMesh if there
are any assiciated with RecastMesh version. So we know the last time when
RecastMesh change resulted into the NavMesh change. When later report shows
that there was no NavMesh change for a new RecastMesh version we can assume
that any object transformation within the same bounding box should not change
NavMesh.
2021-04-18 23:00:13 +02:00
elsid
8e1c92d9af
Use std::variant for ESM::Variant implementation
2021-04-08 19:39:31 +02:00
elsid
7f577f5f08
Do not compare hash in tests
...
Different std libraries have different implementation that produce different
results for the same values.
2021-04-08 19:39:30 +02:00
elsid
dae3f022ba
Add tests for ESM::Variant
2021-04-04 23:09:50 +02:00
elsid
f2ebad5115
Return cached element when set existing
2021-03-25 19:28:41 +01:00
elsid
fac5759748
Set bounding min and max height for btHeightfieldTerrainShape
...
They must be set for proper AABB based filtering. Use
+-max(abs(min), abs(max)) to make sure bullet does not shift coordinates by z.
2021-02-28 20:49:22 +01:00
elsid
fdca76ce86
Remove unused includes
2021-02-28 20:44:56 +01:00
elsid
8dba61f7ae
Use navmesh raycast to find reachable position around target
2021-02-14 04:14:22 +01:00
Sergey Fukanchik
f3271cb66b
Add unit test for swapEndiannessInplace(). Part of Bug #5837
2021-02-09 13:09:36 -05:00
elsid
489107c5ee
Count navmesh cache key once in item size
...
Key is stored only in NavMeshTilesCache::Item, TileMap uses KeyView with
a pointer to a vector.
2021-02-04 00:44:23 +01:00
Alexei Dobrohotov
8db2ba2b38
Merge pull request #3032 from akortunov/gtest
...
Mark mock methods as overrides (requires GTest 1.10)
2020-12-18 01:46:42 +03:00
Alexei Dobrohotov
8fd45d85ec
Unify NiGeometry/NiGeometryData handling
2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
15291f15d3
Make actor collision box components a struct
2020-12-11 20:07:59 +03:00
psi29a
7156b11dbc
be explicit about narrowing to resolve: error: type 'btScalar *' (aka 'float *') cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
2020-12-10 21:30:05 +00:00
AnyOldName3
fd4a62ce35
Use correct variable types when loading config for tests
2020-12-09 00:32:01 +00:00
Andrei Kortunov
807367ca3f
Mark mock methods as overrides (requires GTest 1.10)
2020-12-07 19:09:58 +04:00
Alexei Dobrohotov
df9667e923
Read NIF bounding volume data correctly
2020-11-14 14:16:29 +03:00
Bret Curtis
f6bead88a9
purge boost/optional.hpp headers
2020-10-25 00:58:44 +02:00
Bret Curtis
5a824d0333
components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues
2020-10-22 23:57:53 +02:00
Bret Curtis
c99be77a32
Merge pull request #3008 from akortunov/strings
...
Rework fixed strings handling
2020-10-13 17:37:48 +02:00
psi29a
bca698d951
Merge branch 'shader_line_numbering' into 'master'
...
Correctly resetting line numbering during shader processing.
See merge request OpenMW/openmw!317
2020-10-07 07:16:45 +00:00
Andrei Kortunov
822764d0fa
Rework fixed strings handling
2020-10-05 21:52:22 +04:00
Alexei Dobrohotov
29ccb09da5
Introduce some extended NIF definitions
2020-10-04 13:18:56 +03:00
Mads Buvik Sandvei
d5450a7d88
Correctly resetting line numbering during shader processing.
2020-10-03 14:22:34 +02:00
Evil Eye
6ad20ec9c7
Mutate base records when adding/removing spells
2020-07-28 08:33:28 +02:00
elsid
00197e1cd9
Optimize recast mesh size by vertex deduplication
2020-06-16 00:51:36 +02:00
elsid
b095ca6c86
Use actor speed to define area cost for pathfinding
2020-06-13 02:24:52 +02:00
Bret Curtis
c69c7d0b3b
Merge pull request #2049 from elsid/bullet_double_precision
...
Support bullet double precision
2020-05-15 07:41:02 +02:00
Capostrophic
30558c2434
Try to resolve CI concerns
2020-05-14 10:00:33 +03:00
elsid
2d7c3bae61
Support bullet with double precision
2020-05-13 19:24:28 +02:00
elsid
ef5a5ef43f
Print not matched values with full precision
2020-05-13 18:44:11 +02:00
elsid
1f3dfaedcc
Add tests for ShaderManager
2020-05-02 17:59:49 +02:00
elsid
b150d681a9
Update same navmesh tile with limited frequency
2020-05-01 18:05:58 +02:00
elsid
bd1ef4dd6d
Add detournavigator test for multiple worker threads
2020-04-26 22:00:55 +02:00
elsid
df6e85b619
Use callback to handle changed tiles
...
Instead of collecting changed tiles into a temporary vector.
2020-04-25 17:56:41 +02:00
Alexey Sokolov
ddab86d940
Use approximate comparison for floating point in test
...
This fixes test suite on my machine
2020-04-19 19:11:38 +01:00
elsid
208a50340d
Specialize DetourNavigator::ObjectId ctor for pointers
...
To fix msvc error:
components\detournavigator\objectid.hpp(14,13): error C2440: 'reinterpret_cast': cannot convert from 'const T' to 'size_t'
with
[
T=unsigned long
]
2020-04-13 20:48:34 +02:00
elsid
7ae7cb181d
Support recast mesh rendering
2020-03-14 09:38:24 +01:00
Capostrophic
aef6cd7006
Fix handling of empty strings in NIF string tables
2020-03-10 23:04:20 +03:00
elsid
349040ffb2
Use status codes to handle navigator errors instead of exceptions
...
For find path use case.
2020-02-04 22:33:56 +01:00
elsid
1e106013a0
Use navmesh to find wander destination outside pathgrid for ground based actors
...
Use dtNavMeshQuery::findRandomPointAroundCircle from recastnavigation
2020-01-21 00:01:06 +01:00
capostrophic
c61f64ae86
Fix tests
2020-01-02 13:07:27 +03:00
elsid
7ec5a20c64
Filter recast mesh triangles by global bounding box
...
Except heightfields to reduce slow down.
2019-11-30 13:19:27 +01:00
elsid
862f50346c
Add tests for settings parser
2019-10-21 22:47:24 +02:00
elsid
07660b5605
Fix detournavigator tests
2019-10-20 18:59:14 +02:00
Capostrophic
790531671a
Fix tests
2019-09-13 21:29:49 +03:00
Capostrophic
8baddefdbd
Refactor extra data and particle modifier handling
...
Objects no longer inherit from extra data class
"Controlled" harmful abstraction no longer exists
Introduced NiParticleModifier/NiParticleCollider abstractions
Extra data size reading moved into the base read() method
2019-09-13 20:26:22 +03:00
elsid
0479ebf5ae
Remove unused actors and navmeshes on update
...
When there is only one actor (player) on a scene and it moving to other
cell first it will be removed from navigator then added. Remove cause
navmesh removing for its half extents. After it is added navmesh for
same half extents is created and added. While this all happens there are
still jobs for old navmesh are processing. Old navmesh still exists
because it is stored by shared pointer. So jobs take tiles from cache
and place them into old navmesh. After that other jobs take same tiles
from cache (half extents and coordinates are equal) and place them into
other navmesh. dtNavMesh changes tile data on add and remove. Adding tile
to two dtNavMesh corrupts tile in both nameshes.
2019-03-10 17:06:15 +03:00
Bret Curtis
c20e69ef24
Merge pull request #2227 from elsid/fix_twitchy_massive_creatures
...
Fix twitchy movement for massive creatures (bug #4907 )
2019-03-09 02:11:11 +01:00
elsid
b9f21ec81a
Use custom steps size to make smooth path depending on half extents
2019-03-08 22:33:34 +03:00
elsid
f2e47d640d
Add option to limit max number of navmesh tiles
2019-03-08 17:39:04 +03:00
elsid
27d7452267
Update scaled objects in navigator
2019-03-04 22:59:39 +03:00
Bret Curtis
14c93b3df0
Revert "Merge pull request #2204 from elsid/fix_navigator_update"
...
This reverts commit 26fb0e7a0f
, reversing
changes made to 42b2391303
.
2019-03-04 11:06:15 +01:00
Bret Curtis
84ce9814fd
Merge pull request #2203 from elsid/update_recastnavigation
...
Update recastnavigation
2019-03-03 20:48:50 +01:00
elsid
133d7447f3
Update scaled objects in navigator
2019-03-03 16:46:41 +03:00
elsid
895899b25b
Fix tests
2019-03-03 13:46:24 +03:00
elsid
2b3bc4fe61
Add detailed output for osg::Vec3f in tests
2019-03-03 13:46:24 +03:00
Bret Curtis
4a69d96483
Merge branch 'esm_name_template_fix' into 'master'
...
Make sure that proper operator function of ESM:FIXED_STRING is used for char[N] argument
See merge request OpenMW/openmw!63
2019-02-23 13:39:15 +00:00
Bret Curtis
8e3b10b5b4
Merge branch 'detour_navigator_unit_test_fix' into 'master'
...
Fix DetourNavigatorNavMeshTilesCacheTest on Windows
See merge request OpenMW/openmw!65
2019-02-23 07:59:03 +00:00
elsid
2342a31add
Add more tests for TileCachedRecastMeshManager
2019-02-22 11:49:02 +03:00
elsid
73734fc04d
Fix update navmesh for not changed objects
...
When update method is called for not changed object befor this change
all object tiles were considered as not object tiles and were removed.
Also this marked those tiles as changed. This lead to alternation
between remove and add each tile update method was called. Problem was
detected by using Animated Containers mod.
2019-02-22 11:48:31 +03:00
Bret Curtis
09262e0336
Merge pull request #2170 from elsid/disable_navigator_option
...
Add option to disable DetourNavigator component (feature #4833 )
2019-02-18 16:01:30 +01:00
elsid
da6df818ff
Fix update navmesh
...
Every updated object should produce a set of changed tiles where it is
placed. Before this change only current object tiles were updated. If
object was moved to another set of tiles then navmesh were not changed
in new tiles.
TileCachedRecastMeshManager::updateObject should add all new tiles if object
was moved and remove all no more used tiles. Both new and old tiles should be
marked as changed.
Also add tests to show desired result for add, update, remove.
2019-02-17 01:50:53 +03:00
elsid
16675fd254
Return empty path when navmesh is not found for agent
2019-02-16 15:37:06 +03:00
elsid
1d3668cd22
Add Navigator interface
2019-02-16 15:37:06 +03:00
Azdul
2412017685
Fix DetourNavigatorNavMeshTilesCacheTest on Windows
2019-02-10 08:04:39 +01:00
Azdul
7940317e42
Make sure that proper operator function is used for char[N] argument
2019-02-03 09:32:32 +01:00
Azdul
32013d35f2
Formatting of CMakeLists made consistent with other CMakeLists files.
2019-01-23 14:21:11 +01:00
Azdul
6d8215ecb6
Google Test / Google Mock / OpenMW unit tests on Windows
2019-01-23 14:21:03 +01:00
Andrei Kortunov
d2613e35a2
Fix some Clang 7 warnings
2018-11-09 19:42:59 +04:00
elsid
6e78fbb538
Double key size for item cache size
2018-11-05 02:21:19 +03:00
elsid
2ba026e2b2
Limit navmesh cache size by data size + key size
2018-11-03 16:14:07 +03:00
elsid
792a0585c0
Add recastnavigation as subdirectory
2018-11-01 17:01:22 +01:00
AnyOldName3
6bbc1cb308
Remove outdated include
2018-10-31 19:32:52 +00:00
AnyOldName3
93843d024c
Remove another duplicate operator<<
2018-10-31 16:26:53 +00:00
Bret Curtis
d6c674660a
Merge pull request #1633 from elsid/pathfinder_detour
...
Use recastnavigation for pathfinding (#2229 )
2018-10-30 20:44:13 +01:00
elsid
50b6ae3e10
Fix calculation for shape local AABB
2018-10-28 16:58:22 +03:00
elsid
abc51a8a17
Add settings option to set max number of polygons per navmesh tile
2018-10-28 15:36:47 +03:00
Andrei Kortunov
d2f3196ee8
Fix testcase for RootCollisionNode with MRK data
2018-10-26 21:21:34 +04: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
1a27489904
Add special type for object id
2018-10-13 22:16:35 +03:00
elsid
7c80bb9411
Support multiple threads for async nav mesh updater
2018-10-13 22:16:34 +03:00
elsid
d02beae5a8
Find path for actors according to their abilities to swim and walk
2018-10-13 22:16:33 +03:00
elsid
c95cea414c
Support water for NavMesh
2018-10-13 22:16:32 +03:00
elsid
72f211ef28
Add enums for area type and flags
2018-10-13 22:16:32 +03:00
elsid
fa23b590a4
Add unwalkable areas to NavMesh
2018-10-13 22:16:32 +03:00
elsid
f6a60790f8
Create collision shape for all avoided nodes
2018-10-13 22:16:31 +03:00
elsid
144e1a063b
Support animated objects
2018-10-13 22:16:30 +03:00
elsid
d2fd9abd51
Split RecastMesh into tiles
2018-10-13 22:16:30 +03:00
elsid
937e8e1803
Allow to create empty RecastMesh
2018-10-13 22:16:29 +03:00
elsid
ed3a255f65
Do not use NavMesh to find changed tiles
2018-10-13 22:16:28 +03:00
elsid
d1e71f9322
Support btBoxShape for RecastMesh
2018-10-13 22:16:28 +03:00
elsid
373adc6ec4
Option to enable/disable file names revisions
2018-10-13 22:16:27 +03:00
elsid
d1d034a1ec
Update NavMesh one by one tile in order from nearest to player
2018-10-13 22:16:26 +03:00
elsid
41caca24ee
Options to enable/disable write recast mesh and nav mesh into file
2018-10-13 22:16:26 +03:00
elsid
fafba8ea0c
Use recastnavigation to find path
2018-10-13 22:16:25 +03:00
Andrei Kortunov
e06f0b797a
Replace all NULLs to nullptr
2018-10-09 10:21:12 +04:00
elsid
f2a63bcf35
Add unit tests for BulletNifLoader
2018-08-11 18:00:52 +03:00
elsid
6afc1dc3a0
Support build with coverage for components and test suite
2018-08-11 17:24:40 +03:00
elsid
ef631a0961
Add dependency for GMock
2018-08-11 16:52:53 +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
Capostrophic
84a871cac7
Actually enable is_pod test
2018-07-28 23:56:42 +03:00
Bret Curtis
0fc198be52
Merge pull request #1698 from Capostrophic/c++11
...
A bunch of C++11-related updates
2018-05-06 10:44:11 +02:00
Capostrophic
85b7aa4f09
Uncomment is_pod test in fixed string tests
2018-05-03 19:47:39 +03:00
elsid
2f9b6b536b
Label gtest directories as system
...
To hide all warnings when use custom GTEST_ROOT.
2018-03-13 21:27:14 +03:00
AnyOldName3
5ce34f1cbf
Move new behaviour into macro to reduce code duplication
2017-09-08 22:17:42 +01:00
AnyOldName3
3c0ec0d6d0
If CMake supports it, sets the debugger working directory for Visual Studio
2017-09-08 17:26:46 +01:00
Andrei Kortunov
de14e9811d
Fixed Travis CI build
2017-05-08 11:16:03 +04:00
scrawl
48c764a580
Update test
2017-05-07 23:31:06 +02:00
scrawl
813af876f6
Use a partial binary search in isReservedName ( Fixes #3835 )
2017-05-07 23:28:56 +02:00
Roman Proskuryakov
5ae1864062
Add unit tests for ESM::FIXED_STRING
2016-05-07 23:27:33 +03:00
scrawl
aae1aa3708
Adjust tests to work with esm_rewrite branch.
2015-11-14 00:27:59 +01:00
scrawl
f91aae2350
Tests: add record overwrite test
2015-11-14 00:27:59 +01:00
scrawl
1e817a976f
Tests: add record deletion test
2015-11-14 00:27:59 +01:00
scrawl
771193bae8
Tests: add content_diagnostics_test (requires some data files)
2015-11-14 00:27:59 +01:00
scrawl
38c155c579
Tests: add dialogue_merging_test (requires some data files)
2015-11-14 00:27:59 +01:00
scrawl
d0d8c2eded
Delete empty test
2015-11-14 00:27:59 +01:00
scrawl
66e7e04807
UnitTests: add another dialogue keyword test
2015-01-10 00:29:07 +01:00
scrawl
1b302b750c
UnitTests: add tests for KeywordSearch conflict resolution
2015-01-09 20:53:49 +01:00
scrawl
9d07edda13
UnitTests: remove GMock which wasn't used anyway, and the gmock headers fail to compile together with gtest on ubuntu 14.04
2015-01-09 20:53:43 +01:00
scrawl
40c3fa0dc1
Fix travis
2014-07-12 18:53:22 +02:00
scrawl
b3735981d6
Remove unused file_finder
2014-05-15 21:36:24 +02:00
scrawl
9998c2783e
Fix travis
...
Why again do we need a unit test for something that was never used?
2014-04-21 17:37:06 +02:00
Lukasz Gromanowski
2c49458b6c
Added unittests for FileFinder::FileFinderStrict class.
...
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-08-31 00:13:42 +02:00
Lukasz Gromanowski
0e83b50659
Changed test dir for SearchTest.
...
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-08-30 23:24:33 +02:00
Lukasz Gromanowski
2baaef7d87
Added unittests for FileFinder::FileFinder class.
...
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-08-30 23:23:34 +02:00
Lukasz Gromanowski
303e02cab5
Added unittests for FileFinder::find function.
...
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-08-30 22:45:30 +02:00
Lukasz Gromanowski
515a865daa
Changed ASSERT_EQ to ASSERT_TRUE/FALSE.
...
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-08-30 22:44:03 +02:00
Lukasz Gromanowski
da0b90ee45
Converted tests from components/misc into google unittests.
...
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2013-08-30 21:57:06 +02:00
Lukasz Gromanowski
770f747eec
Added fix for not visible pthreads functions for linker with glibc 2.15
...
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2012-08-20 00:18:40 +03:00
Lukasz Gromanowski
34513cf16b
Added support for code coverage checking and unittests.
...
Added support for code coverage checking with gcov and
unittests with Google C++ unittest and GMock frameworks.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2012-08-19 22:23:46 +03:00