From 5703338d67475ec755c88443b3faa6578b6df6d5 Mon Sep 17 00:00:00 2001 From: gir489 <100792176+gir489returns@users.noreply.github.com> Date: Thu, 4 Apr 2024 03:43:10 -0400 Subject: [PATCH] Fixed vehicles in preview exploding. (#2908) * Closes #2905 * Fixed set_mp_bitset being called from vehicle::spawned if the is_networked parameter was false. --- src/services/model_preview/model_preview_service.cpp | 2 ++ src/util/vehicle.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/model_preview/model_preview_service.cpp b/src/services/model_preview/model_preview_service.cpp index b2b5f306..1092f727 100644 --- a/src/services/model_preview/model_preview_service.cpp +++ b/src/services/model_preview/model_preview_service.cpp @@ -159,6 +159,8 @@ namespace big ENTITY::FREEZE_ENTITY_POSITION(m_current_ent, true); ENTITY::SET_ENTITY_ALPHA(m_current_ent, 0, false); ENTITY::SET_ENTITY_COLLISION(m_current_ent, false, false); + ENTITY::SET_ENTITY_CAN_BE_DAMAGED(m_current_ent, false); + ENTITY::SET_ENTITY_PROOFS(m_current_ent, true, true, true, true, true, true, true, true); ENTITY::SET_CAN_CLIMB_ON_ENTITY(m_current_ent, false); OBJECT::SET_OBJECT_ALLOW_LOW_LOD_BUOYANCY(m_current_ent, false); } diff --git a/src/util/vehicle.cpp b/src/util/vehicle.cpp index bf1eae8d..daac2dc0 100644 --- a/src/util/vehicle.cpp +++ b/src/util/vehicle.cpp @@ -158,7 +158,7 @@ namespace big::vehicle STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash); - if (*g_pointers->m_gta.m_is_session_started) + if (is_networked && *g_pointers->m_gta.m_is_session_started) { set_mp_bitset(veh); }