From 9533afc628dc1f8fdd2a73c5c18d3cc301454a3a Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 14 Nov 2022 01:04:01 +0100 Subject: [PATCH] Add new 'shortcut' buttons to host panel * Added "Rebuild AI Network" (rebuilds the AIN file). * Added "NavMesh Hot Swap" (hot reloads the navmesh files). * Added "AI Settings Reparse" (reparses ai settings on the server and client). --- r5dev/gameui/IBrowser.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/r5dev/gameui/IBrowser.cpp b/r5dev/gameui/IBrowser.cpp index c191989a..5485ba14 100644 --- a/r5dev/gameui/IBrowser.cpp +++ b/r5dev/gameui/IBrowser.cpp @@ -556,7 +556,33 @@ void CBrowser::HostPanel(void) } } - if (ImGui::Button("Weapon Reparse", ImVec2(ImGui::GetWindowContentRegionWidth(), 32))) + ImGui::Spacing(); + ImGui::Separator(); + ImGui::Spacing(); + + if (ImGui::Button("Rebuild AI Network", ImVec2(ImGui::GetWindowContentRegionWidth(), 32))) + { + ProcessCommand("BuildAINFile"); + } + + if (ImGui::Button("NavMesh Hot Swap", ImVec2(ImGui::GetWindowContentRegionWidth(), 32))) + { + ProcessCommand("navmesh_hotswap"); + } + + ImGui::Spacing(); + ImGui::Separator(); + ImGui::Spacing(); + + if (ImGui::Button("AI Settings Reparse", ImVec2(ImGui::GetWindowContentRegionWidth(), 32))) + { + DevMsg(eDLL_T::ENGINE, "Reparsing AI data on %s\n", "server and client"); + + ProcessCommand("aisettings_reparse"); + ProcessCommand("aisettings_reparse_client"); + } + + if (ImGui::Button("Weapon Settings Reparse", ImVec2(ImGui::GetWindowContentRegionWidth(), 32))) { DevMsg(eDLL_T::ENGINE, "Reparsing weapon data on %s\n", "server and client"); ProcessCommand("weapon_reparse");