fix(network): prevent null multiplayer peer crashes offline/teardown and fix Nakama RPC session validation

This commit is contained in:
2026-07-10 17:36:26 +08:00
parent 2b4c9d9dcb
commit b30709de3d
84 changed files with 5291 additions and 982 deletions
+4
View File
@@ -1,4 +1,8 @@
## [NEXT]
- Fixed `api_rpc_async` returning null or retrying indefinitely when a Nakama session expires, cleanly catching null sessions without crashing.
- Fixed `AuthManager.logout()` failing to invalidate Nakama sessions on the backend.
- Fixed numerous offline networking crashes across `main.gd`, `player.gd`, `player_action_manager.gd`, and `tekton.gd` where `multiplayer.get_unique_id()` or `multiplayer.is_server()` was called during teardown or disconnected states.
- Fixed `on_thrown_landing` throwing C++ errors when knocked offline by guarding `get_tree()` calls.
- Changed Candy Survival knock from instant-ambush to **toggle-and-walk mode** like other game modes: press Q to toggle Knock Mode ON (red glow), then walk into a target to execute the knock. Press Q again to cancel. Consumed on use. Bots auto-toggle when they have charges.
- Fixed `Attempt to call RPC with unknown peer ID: 5` crash in Candy Survival when updating ghost inventory or candy stacks for AI bots or unverified peers.
- Added +100 score rewards in Candy Survival when completing goals by collecting tiles, successfully landing a KNOCK, or tactically activating GHOST.