Fixed LS Customs camera being stuck on certain vehicles. (#2539)
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "backend/looped/looped.hpp"
|
||||
#include "backend/looped/looped.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
#include "gta_util.hpp"
|
||||
#include "script_function.hpp"
|
||||
@ -51,8 +52,8 @@ namespace big
|
||||
g_script_patcher_service->update();
|
||||
|
||||
scr_functions::setup_modshop.call_latent(g.m_modshop_thread, gta_util::find_script_program(RAGE_JOAAT("carmod_shop")), {45, 0, 18, 0}, bModshopReady);
|
||||
*script_local(g.m_modshop_thread->m_stack, 731).at(446).as<int*>() = 2;
|
||||
*script_local(g.m_modshop_thread->m_stack, 2238).as<ControllerInputs*>() = ControllerInputs::INPUT_FRONTEND_LT;
|
||||
*scr_locals::carmod_shop::maintainer.set(g.m_modshop_thread->m_stack).at(scr_locals::carmod_shop::state).as<PINT>() = 2;
|
||||
*scr_locals::carmod_shop::input_button.set(g.m_modshop_thread->m_stack).as<ControllerInputs*>() = ControllerInputs::INPUT_FRONTEND_LT;
|
||||
}
|
||||
});
|
||||
bLastLsCustoms = true;
|
||||
@ -82,18 +83,18 @@ namespace big
|
||||
{
|
||||
PAD::DISABLE_CONTROL_ACTION(0, (int)ControllerInputs::INPUT_VEH_CIN_CAM, true);
|
||||
|
||||
if (*script_local(g.m_modshop_thread->m_stack, 2467).as<bool*>() && PAD::IS_CONTROL_JUST_PRESSED(2, (int)ControllerInputs::INPUT_FRONTEND_ACCEPT))
|
||||
if (*scr_locals::carmod_shop::enabled_state.set(g.m_modshop_thread->m_stack).as<bool*>() && PAD::IS_CONTROL_JUST_PRESSED(2, (int)ControllerInputs::INPUT_FRONTEND_ACCEPT))
|
||||
g.vehicle.ls_customs = false;
|
||||
}
|
||||
|
||||
if (g.vehicle.ls_customs && bModshopReady && g.m_modshop_thread && g.m_modshop_thread->m_stack)
|
||||
{
|
||||
*script_local(g.m_modshop_thread->m_stack, 2419).as<bool*>() = false;
|
||||
*script_local(g.m_modshop_thread->m_stack, 731).at(638).as<int*>() = -1;
|
||||
*script_local(g.m_modshop_thread->m_stack, 731).at(409).as<Vehicle*>() = self::veh;
|
||||
*scr_locals::carmod_shop::ready.set(g.m_modshop_thread->m_stack).as<PBOOL*>() = FALSE;
|
||||
*scr_locals::carmod_shop::maintainer.set(g.m_modshop_thread->m_stack).at(scr_locals::carmod_shop::vehicle_state).as<int*>() = -1;
|
||||
*scr_locals::carmod_shop::maintainer.set(g.m_modshop_thread->m_stack).at(scr_locals::carmod_shop::vehicle_ent_id).as<Vehicle*>() = self::veh;
|
||||
|
||||
if (*script_local(g.m_modshop_thread->m_stack, 731).at(446).as<int*>() == 0)
|
||||
*script_local(g.m_modshop_thread->m_stack, 731).at(446).as<int*>() = 2;
|
||||
if (*scr_locals::carmod_shop::maintainer.set(g.m_modshop_thread->m_stack).at(scr_locals::carmod_shop::state).as<PINT>() == 0)
|
||||
*scr_locals::carmod_shop::maintainer.set(g.m_modshop_thread->m_stack).at(scr_locals::carmod_shop::state).as<PINT>() = 2;
|
||||
|
||||
scr_functions::modshop_loop.call(g.m_modshop_thread, gta_util::find_script_program(RAGE_JOAAT("carmod_shop")), {});
|
||||
}
|
||||
|
Reference in New Issue
Block a user