Added spawn ped feature. (#377)

This commit is contained in:
aa15032261
2022-08-10 08:42:34 +08:00
committed by GitHub
parent 954b7673ee
commit 77adac6e1a
32 changed files with 1178 additions and 608 deletions

View File

@ -84,7 +84,7 @@ namespace big
components::input_text_with_hint("Model Name", "Search", search, sizeof(search), ImGuiInputTextFlags_None);
g_mobile_service->refresh_personal_vehicles();
if (ImGui::ListBoxHeader("###personal_veh_list", { 300, static_cast<float>(*g_pointers->m_resolution_y - 184 - 38 * num_of_rows) }))
if (ImGui::ListBoxHeader("###personal_veh_list", { 300, static_cast<float>(*g_pointers->m_resolution_y - 188 - 38 * num_of_rows) }))
{
if (g_mobile_service->personal_vehicles().empty())
{
@ -118,7 +118,7 @@ namespace big
components::selectable(label, false, [&personal_veh] {
if (g->clone_pv.spawn_clone)
{
Vector3 spawn_location = vehicle::get_spawn_location(g->spawn.spawn_inside);
Vector3 spawn_location = vehicle::get_spawn_location(g->spawn_vehicle.spawn_inside);
float spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
auto vehicle_idx = personal_veh->get_vehicle_idx();
@ -161,7 +161,7 @@ namespace big
});
ImGui::PopID();
if (!g->spawn.preview_vehicle || (g->spawn.preview_vehicle && !ImGui::IsAnyItemHovered()))
if (!g->clone_pv.preview_vehicle || (g->clone_pv.preview_vehicle && !ImGui::IsAnyItemHovered()))
{
g_model_preview_service->stop_preview();
}