NEON-29: Fix CI tests (horizontal step flag, idle_support vectors)
parent
9bdd928c80
commit
a442f02dbd
|
|
@ -12,7 +12,12 @@ func test_idle_support_is_stable_on_flat_floor_without_wall_contacts() -> void:
|
|||
|
||||
func test_idle_support_is_stable_false_when_floor_is_not_flat_enough() -> void:
|
||||
var slide_normals: Array[Vector3] = [Vector3.UP]
|
||||
var tilted_floor: Vector3 = Vector3(0.07, 0.9975, 0.0).normalized()
|
||||
# Must be steeper than [member STABLE_IDLE_FLOOR_MIN_UP_DOT] (0.998) *and* below
|
||||
# [member IDLE_SLOPE_STABLE_MIN_UP_DOT] (0.88), or the ramp short-circuit treats support as stable.
|
||||
var tilted_floor: Vector3 = Vector3(0.5, 0.82, 0.0).normalized()
|
||||
assert_that(tilted_floor.dot(Vector3.UP)).is_less(
|
||||
PLAYER_SCRIPT.get("IDLE_SLOPE_STABLE_MIN_UP_DOT")
|
||||
)
|
||||
var stable: bool = PLAYER_SCRIPT.idle_support_is_stable(true, tilted_floor, slide_normals, 0)
|
||||
assert_that(stable).is_false()
|
||||
|
||||
|
|
@ -40,8 +45,13 @@ func test_idle_support_is_stable_true_when_loose_ticks_and_ridged_but_floor_stil
|
|||
|
||||
func test_idle_support_is_stable_false_when_loose_ticks_and_ridged_and_shallow_floor() -> void:
|
||||
var slide_normals: Array[Vector3] = [Vector3.UP, Vector3(1.0, 0.0, 0.0)]
|
||||
var floor_n: Vector3 = Vector3(0.35, 0.88, 0.0).normalized()
|
||||
assert_that(floor_n.dot(Vector3.UP) < 0.968).is_true()
|
||||
# Normal must be outside the ramp-stable band [IDLE_SLOPE_STABLE_MIN_UP_DOT, IDLE_RIM) or
|
||||
# `idle_ridged_stair_lip_only` is false and the ramp short-circuit returns stable. Use a tread
|
||||
# tilt above the rim dot but still below the ridged hold threshold (0.992).
|
||||
var floor_n: Vector3 = Vector3(0.14, 0.98, 0.0).normalized()
|
||||
var up_dot: float = floor_n.dot(Vector3.UP)
|
||||
assert_that(up_dot).is_greater_equal(PLAYER_SCRIPT.get("IDLE_RIM_MIN_FLOOR_UP_DOT") as float)
|
||||
assert_that(up_dot).is_less(PLAYER_SCRIPT.get("STABLE_IDLE_FLOOR_MIN_UP_DOT") as float)
|
||||
var stable: bool = PLAYER_SCRIPT.idle_support_is_stable(true, floor_n, slide_normals, 12)
|
||||
assert_that(stable).is_false()
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,11 @@ public class MoveCommandApiTests
|
|||
{
|
||||
b.ConfigureTestServices(services =>
|
||||
{
|
||||
services.PostConfigure<GamePositionOptions>(o => o.MovementValidation.MaxHorizontalStep = 1.0);
|
||||
services.PostConfigure<GamePositionOptions>(o =>
|
||||
{
|
||||
o.MovementValidation.HorizontalStepEnabled = true;
|
||||
o.MovementValidation.MaxHorizontalStep = 1.0;
|
||||
});
|
||||
});
|
||||
});
|
||||
var client = factory.CreateClient();
|
||||
|
|
|
|||
Loading…
Reference in New Issue