Use the_hub addon from example suite by the integration tests

pull/3236/head
elsid 4 months ago
parent eb6dc6e6b0
commit 5f26da01f1
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -159,8 +159,8 @@ testing.registerLocalTest('playerDiagonalWalking',
testing.registerLocalTest('findPath',
function()
local src = util.vector3(4096, 4096, 867.237)
local dst = util.vector3(4500, 4500, 700.216)
local src = util.vector3(4096, 4096, 1745)
local dst = util.vector3(4500, 4500, 1745.95263671875)
local options = {
agentBounds = types.Actor.getPathfindingAgentBounds(self),
includeFlags = nearby.NAVIGATOR_FLAGS.Walk + nearby.NAVIGATOR_FLAGS.Swim,
@ -180,7 +180,7 @@ testing.registerLocalTest('findPath',
testing.registerLocalTest('findRandomPointAroundCircle',
function()
local position = util.vector3(4096, 4096, 867.237)
local position = util.vector3(4096, 4096, 1745.95263671875)
local maxRadius = 100
local options = {
agentBounds = types.Actor.getPathfindingAgentBounds(self),
@ -193,8 +193,8 @@ testing.registerLocalTest('findRandomPointAroundCircle',
testing.registerLocalTest('castNavigationRay',
function()
local src = util.vector3(4096, 4096, 867.237)
local dst = util.vector3(4500, 4500, 700.216)
local src = util.vector3(4096, 4096, 1745)
local dst = util.vector3(4500, 4500, 1745.95263671875)
local options = {
agentBounds = types.Actor.getPathfindingAgentBounds(self),
includeFlags = nearby.NAVIGATOR_FLAGS.Walk + nearby.NAVIGATOR_FLAGS.Swim,
@ -206,14 +206,14 @@ testing.registerLocalTest('castNavigationRay',
testing.registerLocalTest('findNearestNavMeshPosition',
function()
local position = util.vector3(4096, 4096, 1000)
local position = util.vector3(4096, 4096, 2000)
local options = {
agentBounds = types.Actor.getPathfindingAgentBounds(self),
includeFlags = nearby.NAVIGATOR_FLAGS.Walk + nearby.NAVIGATOR_FLAGS.Swim,
searchAreaHalfExtents = util.vector3(1000, 1000, 1000),
}
local result = nearby.findNearestNavMeshPosition(position, options)
local expected = util.vector3(4096, 4096, 872.674)
local expected = util.vector3(4096, 4096, 1746.27099609375)
testing.expectLessOrEqual((result - expected):length(), 1,
'Navigation mesh position ' .. testing.formatActualExpected(result, expected))
end)

@ -220,7 +220,7 @@ local function testMemoryLimit()
end
local function initPlayer()
player:teleport('', util.vector3(4096, 4096, 867.237), util.transform.identity)
player:teleport('', util.vector3(4096, 4096, 1745), util.transform.identity)
coroutine.yield()
end

@ -21,6 +21,7 @@ example_suite_dir = Path(args.example_suite).resolve()
content_paths = (
example_suite_dir / "game_template" / "data" / "template.omwgame",
example_suite_dir / "example_animated_creature" / "data" / "landracer.omwaddon",
example_suite_dir / "the_hub" / "data" / "the_hub.omwaddon",
)
for path in content_paths:
if not path.is_file():

Loading…
Cancel
Save