Skip to content

UE hooking + diag teleportation#5

Open
ILLISIS wants to merge 3 commits intoclusterio:1.2from
ILLISIS:1.2
Open

UE hooking + diag teleportation#5
ILLISIS wants to merge 3 commits intoclusterio:1.2from
ILLISIS:1.2

Conversation

@ILLISIS
Copy link

@ILLISIS ILLISIS commented Mar 22, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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}")`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +100 to +101
local serialized = universal_serializer.LuaEntity.serialize(entity)
entity.destroy{raise_destroy = true}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +328 to +330
local new_schedule = table.deepcopy(train_data.schedule)
table.remove(new_schedule.records, new_schedule.current)
train_data.schedule = new_schedule

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant