Fix multiplayer state: stacked players, ghosts after rejoin; add a build stamp
checkpoint / checkpoint (push) Successful in 1m40s
checkpoint / checkpoint (push) Successful in 1m40s
- Clients now hard-snap to the server's spawn position on the first snapshot. player.gd starts everyone on the fixed PlayerSpawn marker but the server spreads spawns out -- so one client saw players ~1m apart (correct) while the other saw them stacked (its local player still on the marker, never corrected because the ~1m drift was under the old 1.5m threshold). Threshold also tightened to 0.6m. - game.gd._exit_tree() closes the ENet connection cleanly when you leave a world, so the server fires peer_disconnected and removes your player. Before, leaving just changed scene and the server never knew -- everyone else kept seeing a frozen "ghost". - server.gd: once-a-second sweep of players whose peer is no longer connected, as a backstop for a missed disconnect. - Build stamp: checkpoint_ops bakes "<PC> <commit>" into application/config/version at export; the menu and in-world HUD show "build PC3 <hash>" so playtest reports aren't ambiguous about which build is running. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015jtxAiu5dAW4WxCNdGkrkJ
This commit is contained in:
@@ -50,6 +50,14 @@ var _is_authenticating: bool = false
|
||||
# ─── Lifecycle ────────────────────────────────────────────────────────────────
|
||||
|
||||
func _ready() -> void:
|
||||
var v := Label.new()
|
||||
v.text = "build %s" % ProjectSettings.get_setting("application/config/version", "dev")
|
||||
v.add_theme_color_override("font_color", Color(1, 1, 1, 0.4))
|
||||
v.add_theme_font_size_override("font_size", 12)
|
||||
v.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_RIGHT)
|
||||
v.position = Vector2(-140, -22)
|
||||
add_child(v)
|
||||
|
||||
# Cache node references.
|
||||
_auth_buttons_row = $CenterContainer/VBoxContainer/AuthButtonsRow
|
||||
_login_button = $CenterContainer/VBoxContainer/AuthButtonsRow/LoginButton
|
||||
|
||||
Reference in New Issue
Block a user