From c36f1dcb522f092c636bc28474637663ba4630e1 Mon Sep 17 00:00:00 2001 From: Yimura Date: Sat, 2 Jan 2021 16:12:28 +0100 Subject: [PATCH] fix(PlayerWindow): Fixed teleport to locations to new struct array --- BigBaseV2/src/gui/player_window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BigBaseV2/src/gui/player_window.cpp b/BigBaseV2/src/gui/player_window.cpp index 16cae39e..a086b341 100644 --- a/BigBaseV2/src/gui/player_window.cpp +++ b/BigBaseV2/src/gui/player_window.cpp @@ -114,12 +114,12 @@ namespace big } ImGui::Text("Force TP Location:"); - if (ImGui::BeginCombo("##teleport_location", location_names[g_temp.teleport_location])) + if (ImGui::BeginCombo("##teleport_location", locations[g_temp.teleport_location].name)) { - for (uint8_t i = 0; i < IM_ARRAYSIZE(location_names); i++) + for (uint8_t i = 0; i < IM_ARRAYSIZE(locations); i++) { bool is_selected = (g_temp.teleport_location == i); - if (ImGui::Selectable(location_names[i], is_selected)) + if (ImGui::Selectable(locations[i].name, is_selected)) g_temp.teleport_location = i; if (is_selected) ImGui::SetItemDefaultFocus(); @@ -131,7 +131,7 @@ namespace big { QUEUE_JOB_BEGIN_CLAUSE() { - int64_t args[9] = { RemoteEvents::Teleport, g_selectedPlayer.id, 1, -1, 1, location_ids[g_temp.teleport_location], 0,0,0 }; // 1097312011 + int64_t args[9] = { RemoteEvents::Teleport, g_selectedPlayer.id, 1, -1, 1, locations[g_temp.teleport_location].id, 0,0,0 }; // 1097312011 g_pointers->m_trigger_script_event(true, args, 9, 1 << g_selectedPlayer.id); }QUEUE_JOB_END_CLAUSE }