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
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
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