From 04bae0bc93db3fbeb13ca25f93549af49d00c3e4 Mon Sep 17 00:00:00 2001 From: Yimura <24669514+Yimura@users.noreply.github.com> Date: Sun, 12 Feb 2023 00:47:05 +0100 Subject: [PATCH] feat(mobile): fix personal vehicle spawning far away (#978) --- src/util/mobile.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/mobile.hpp b/src/util/mobile.hpp index 085172a7..5b57422b 100644 --- a/src/util/mobile.hpp +++ b/src/util/mobile.hpp @@ -136,7 +136,11 @@ namespace big::mobile script::get_current()->yield(100ms); - *scr_globals::mechanic_global.at(936).as() = 1; // disable vehicle node distance check + // only do this when spawn inside is enabled otherwise the vehicle will spawn relatively far away from players + if (g.clone_pv.spawn_inside) + { + *scr_globals::mechanic_global.at(936).as() = 1; // disable vehicle node distance check + } *scr_globals::mechanic_global.at(923).as() = 1; // tell freemode to spawn our vehicle *scr_globals::mechanic_global.at(982).as() = 0; // required *scr_globals::mechanic_global.at(979).as() = veh_idx;