Integrate per-save identity and interaction UI
This commit is contained in:
parent
ac82a28f3b
commit
4fda6e97f6
58 changed files with 3471 additions and 461 deletions
|
|
@ -195,11 +195,56 @@ func _validate_compact_animation_encoding() -> void:
|
|||
func _validate_airborne_sitting(avatar: Player) -> void:
|
||||
avatar.reset_network_movement_state()
|
||||
avatar.set_local_control(true)
|
||||
avatar.set("_sit_after_landing", true)
|
||||
avatar.global_position = Vector3(0.0, 2.0, 0.0)
|
||||
avatar.velocity = Vector3(0.0, -1.0, 0.0)
|
||||
avatar.toggle_sitting()
|
||||
assert(avatar.get_network_sitting_intent())
|
||||
assert(not avatar.get_network_sitting_state())
|
||||
assert(bool(avatar.get("_sitting_intent_pending")))
|
||||
assert(not bool(avatar.make_network_snapshot(2)["sitting"]))
|
||||
assert(bool(avatar.capture_network_input(1)["sitting"]))
|
||||
|
||||
# Reproduce the high-RTT owner audit race: the host has reached the ground
|
||||
# and reports the deferred sit while this client's predicted capsule is still
|
||||
# airborne. Repeated seated snapshots must not zero its falling velocity.
|
||||
var delayed_sit_snapshot: Dictionary = _network_snapshot(
|
||||
avatar.global_position,
|
||||
Vector3.ZERO,
|
||||
1,
|
||||
)
|
||||
delayed_sit_snapshot["sitting"] = true
|
||||
avatar.apply_local_prediction_correction(
|
||||
delayed_sit_snapshot,
|
||||
1,
|
||||
1.0 / 30.0,
|
||||
0.3,
|
||||
0.1,
|
||||
)
|
||||
assert(not avatar.is_sitting())
|
||||
assert(bool(avatar.get("_sit_after_landing")))
|
||||
assert(avatar.velocity.y < 0.0)
|
||||
var airborne_height: float = avatar.global_position.y
|
||||
avatar.call("_simulate_movement_physics", 0.1)
|
||||
assert(avatar.global_position.y < airborne_height)
|
||||
assert(avatar.velocity.y < -1.0)
|
||||
for _delayed_audit: int in 3:
|
||||
delayed_sit_snapshot["position"] = [
|
||||
avatar.global_position.x,
|
||||
avatar.global_position.y,
|
||||
avatar.global_position.z,
|
||||
]
|
||||
var falling_velocity: float = avatar.velocity.y
|
||||
avatar.apply_local_prediction_correction(
|
||||
delayed_sit_snapshot,
|
||||
1,
|
||||
1.0 / 30.0,
|
||||
0.3,
|
||||
0.1,
|
||||
)
|
||||
assert(not avatar.is_sitting())
|
||||
assert(is_equal_approx(avatar.velocity.y, falling_velocity))
|
||||
avatar.call("_simulate_movement_physics", 0.1)
|
||||
assert(avatar.global_position.y < airborne_height)
|
||||
avatar.call("_queue_local_network_jump_intent")
|
||||
var jumping_input: Dictionary = avatar.capture_network_input(2)
|
||||
assert(bool(jumping_input["jump"]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue