Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aacd92cdec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ); | ||
| const escapedName = lib.escapeString(data.player_name); | ||
| const escapedAddress = lib.escapeString(address); | ||
| await this.sendRcon(`/sc gridworld.corner_teleport_response("${escapedName}", "${escapedAddress}")`); |
There was a problem hiding this comment.
Send the diagonal payload before reconnecting the player
This reconnects the client before the actual diagonal transfer is emitted from corner_scanner.on_player_left_game() on the source server. The target side only consumes that payload in corner_scanner.on_player_joined_game() (module/corner_scanner.lua:149-175), so when the reconnect finishes before the instance-to-instance request is processed, the join hook runs first and the later payload is never applied. In that case diagonal transfers leave players at the normal spawn, and vehicle riders never get reattached.
Useful? React with 👍 / 👎.
| local serialized = universal_serializer.LuaEntity.serialize(entity) | ||
| entity.destroy{raise_destroy = true} |
There was a problem hiding this comment.
Wait for the remote transfer before destroying the source vehicle
The car/spider is serialized and destroyed here before the IPC path even tries to forward it to the diagonal neighbor. If handleCornerEntityTransferIpc() later finds no neighbor or its sendTo() fails because the target instance is stopped/unreachable, there is no recovery path: the source vehicle and everything in it have already been deleted. That turns a transient transfer failure into permanent vehicle/item loss.
Useful? React with 👍 / 👎.
| local new_schedule = table.deepcopy(train_data.schedule) | ||
| table.remove(new_schedule.records, new_schedule.current) | ||
| train_data.schedule = new_schedule |
There was a problem hiding this comment.
Clamp the train schedule index after removing the UE stop
When the current UE stop is removed, new_schedule.current is left unchanged even though records just shrank. If the transferred stop was the last current record, schedule.current now points past the end of the array, and the downstream pathing/proxy logic that reads schedule.records[schedule.current] in module/train_path_manager.lua:52-76,196-206 stops seeing the real destination. remove_temporary_schedule_stops() in the same module already clamps current for this exact case.
Useful? React with 👍 / 👎.
No description provided.