Fix vehicle spawner (#95)
Some checks are pending
Nightly Build / Build Nightly (push) Waiting to run
Nightly Build / Recreate Release (push) Blocked by required conditions
Nightly Build / Check Recent Commit (push) Successful in 2m24s

This commit is contained in:
Mr-X-GTA
2025-02-06 13:06:53 +01:00
committed by GitHub
parent 7064995875
commit c8e6a6970b
3 changed files with 14 additions and 13 deletions

View File

@ -17,7 +17,7 @@ jobs:
runs-on: windows-latest
name: CI
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check CMake version
run: cmake --version
@ -45,13 +45,13 @@ jobs:
working-directory: build/
- name: Upload Artifact (dll)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binary
path: |
build/YimMenu-dev-*.dll
- name: Upload Artifact (pdb)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pdb
path: |

View File

@ -17,7 +17,7 @@ jobs:
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: should_run
name: Check if latest commit date is within the previous 24 hours
@ -37,7 +37,7 @@ jobs:
full_sha: ${{ steps.var.outputs.full_sha }}
short_sha: ${{ steps.var.outputs.short_sha }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
@ -56,7 +56,7 @@ jobs:
run: cmake --build ./build --config RelWithDebInfo --target YimMenu --
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: binary
path: |
@ -75,7 +75,7 @@ jobs:
needs: build_nightly
if: needs.check_recent_commit.outputs.should_run == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Delete Existing Release
id: delete_release
@ -119,7 +119,7 @@ jobs:
}
- name: Download Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: binary

View File

@ -165,12 +165,13 @@ namespace big
for (auto& item : calculated_map)
{
const auto& vehicle = item.second;
ImGui::PushID(vehicle.m_hash);
components::selectable(vehicle.m_display_name, false, [&vehicle] {
const auto spawn_location = vehicle::get_spawn_location(g.spawn_vehicle.spawn_inside, vehicle.m_hash);
const auto vehicle_hash = vehicle.m_hash;
ImGui::PushID(vehicle_hash);
components::selectable(vehicle.m_display_name, false, [vehicle_hash] {
const auto spawn_location = vehicle::get_spawn_location(g.spawn_vehicle.spawn_inside, vehicle_hash);
const auto spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
auto veh = vehicle::spawn(vehicle.m_hash, spawn_location, spawn_heading);
auto veh = vehicle::spawn(vehicle_hash, spawn_location, spawn_heading);
if (veh == 0)
{
@ -202,7 +203,7 @@ namespace big
}
else if (ImGui::IsItemHovered())
{
g_model_preview_service->show_vehicle(vehicle.m_hash, g.spawn_vehicle.spawn_maxed);
g_model_preview_service->show_vehicle(vehicle_hash, g.spawn_vehicle.spawn_maxed);
}
}
}