refactor: type the IGameServices payload as a variant instead of void*

This commit is contained in:
MatthewBeshay
2026-04-08 19:40:20 +10:00
parent 8084ec7857
commit 52b4ccaea2
17 changed files with 141 additions and 92 deletions

View File

@@ -107,11 +107,14 @@ void UIScene_DebugSetCamera::handleInput(int iPad, int key, bool repeat,
void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId) {
switch ((int)controlId) {
case eControl_Teleport:
case eControl_Teleport: {
std::unique_ptr<minecraft::XuiActionOwnedPayload> payload(
currentPosition);
currentPosition = nullptr; // ownership transferred
app.SetXuiServerAction(PlatformProfile.GetPrimaryPad(),
eXuiServerAction_SetCameraLocation,
(void*)currentPosition);
break;
std::move(payload));
} break;
case eControl_CamX:
case eControl_CamY:
case eControl_CamZ: