## News:

Use the "Forum Search"

## Graphic error on the map

Started by Yona-TYT, October 12, 2022, 08:59:40 PM

0 Members and 1 Guest are viewing this topic.

#### Yona-TYT

At the end of the tests script, the map shows a classic graphical error.

#### prissi

Did you change the ground water height in the scenario?

#### Yona-TYT

#2
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)`