feat(mobile): fix personal vehicle spawning far away (#978)

This commit is contained in:
Yimura 2023-02-12 00:47:05 +01:00 committed by GitHub
parent 77e9c9e884
commit 04bae0bc93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,11 @@ namespace big::mobile
script::get_current()->yield(100ms);
*scr_globals::mechanic_global.at(936).as<int*>() = 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<int*>() = 1; // disable vehicle node distance check
}
*scr_globals::mechanic_global.at(923).as<int*>() = 1; // tell freemode to spawn our vehicle
*scr_globals::mechanic_global.at(982).as<int*>() = 0; // required
*scr_globals::mechanic_global.at(979).as<int*>() = veh_idx;