From 9877164591637a39c1e84126a36be72d5053f18f Mon Sep 17 00:00:00 2001 From: 8KV <82761117+8KV@users.noreply.github.com> Date: Wed, 16 Nov 2022 21:31:12 +0200 Subject: [PATCH] feat(PersistCar): collision, invincibility & visibility on vehicle (#602) --- src/services/vehicle/persist_car_service.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/services/vehicle/persist_car_service.cpp b/src/services/vehicle/persist_car_service.cpp index d2614e2e..7da41fe6 100644 --- a/src/services/vehicle/persist_car_service.cpp +++ b/src/services/vehicle/persist_car_service.cpp @@ -127,8 +127,11 @@ namespace big attachment.rotation.x, attachment.rotation.y, attachment.rotation.z, false, false, false, false, 0, true, 0); - - VEHICLE::SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(vehicle_to_attach, false); + + ENTITY::SET_ENTITY_VISIBLE(vehicle_to_attach, attachment.is_visible, 0); + ENTITY::SET_ENTITY_COLLISION(vehicle_to_attach, attachment.has_collision, true); + ENTITY::SET_ENTITY_INVINCIBLE(vehicle_to_attach, attachment.is_invincible); + VEHICLE::SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(vehicle_to_attach, true); } return vehicle;