Add starter RV progression and fishing feedback

This commit is contained in:
Alexander Sellite 2026-08-31 16:03:55 -04:00
parent eed361681a
commit d8bf59bca0
47 changed files with 2268 additions and 467 deletions

View file

@ -49,6 +49,7 @@ func _run_host() -> void:
host_fingerprint
)
assert(_same_door_position(host_avatar.global_position, host_spawn.origin))
assert(_faces_away_from_home(host_avatar, home_world, host_fingerprint))
assert(network_home.request_enter(host_fingerprint))
await physics_frame
host_avatar.global_position = home_world.get_interior_exit_position(
@ -57,6 +58,7 @@ func _run_host() -> void:
assert(network_home.request_exit())
await physics_frame
assert(_same_door_position(host_avatar.global_position, host_spawn.origin))
assert(_faces_away_from_home(host_avatar, home_world, host_fingerprint))
var remote_peer_id: int = await _wait_for_remote_peer(session)
assert(remote_peer_id > 1)
@ -70,6 +72,9 @@ func _run_host() -> void:
assert(_same_door_position(
remote_avatar.global_position, remote_spawn.origin
))
assert(_faces_away_from_home(
remote_avatar, home_world, remote_fingerprint
))
var disconnect_deadline: int = Time.get_ticks_msec() + 12000
while (
@ -118,6 +123,7 @@ func _run_client() -> void:
assert(_same_door_position(
player.global_position, exterior_spawn.origin
))
assert(_faces_away_from_home(player, home_world, fingerprint))
print("Home spawn multiplayer client validation: PASS")
await _cleanup(main, session)
@ -151,6 +157,23 @@ func _wait_for_home(
return false
func _faces_away_from_home(
avatar: Player,
home_world: HomeWorldService,
fingerprint: String,
) -> bool:
var exterior_basis: Basis = home_world.get_exterior_transform(
fingerprint
).basis
var outward_direction := exterior_basis.z
outward_direction.y = 0.0
if outward_direction.is_zero_approx():
return false
return avatar.get_facing_direction().dot(
outward_direction.normalized()
) >= 0.99
func _wait_for_remote_peer(session: NetworkSession) -> int:
var deadline: int = Time.get_ticks_msec() + 20000
while Time.get_ticks_msec() < deadline: