At the end of the tests script, the map shows a classic graphical error.Captura desde 2022-10-12 16-56-00.png Captura desde 2022-10-12 16-56-00.png
Did you change the ground water height in the scenario?
Quote from: prissi on October 18, 2022, 06:55:13 AMDid you change the ground water height in the scenario?
No, apparently it is caused by the "set slope" commands
Occurs when this function is executed:
function test_slope_max_height_diff()
{
local pl = player_x(0)
local setslope = command_x.set_slope
// build upwards, height difference = 4
{
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 0), slope.all_up_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 1), slope.all_up_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 2), slope.all_up_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 3), slope.all_up_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 4), slope.all_up_slope), "Maximum tile height difference reached.")
}
// diagonally, the height difference is unlimited (technically limited to 2*max_diff)
{
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, 0), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -1), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -2), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -3), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -4), slope.all_down_slope), "Maximum tile height difference reached.")
}
// and clean up
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 4), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 3), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 2), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(3, 2, 1), slope.all_down_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -4), slope.all_up_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -3), slope.all_up_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -2), slope.all_up_slope), null)
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -1), slope.all_up_slope), null)
RESET_ALL_PLAYER_FUNDS()
}
EDIT:
Specifically when running:
ASSERT_EQUAL(setslope(pl, coord3d(2, 3, -2), slope.all_down_slope), null)Captura desde 2022-10-18 06-53-00.png