From 9418b6950a12610361d96a99d058e9e10de03713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1=C4=8Dek?= Date: Thu, 5 Nov 2026 10:00:12 +0100 Subject: [PATCH] Fix garage vehicle faction access; record Workshop 0.0.140 --- CHANGELOG.md | 6 +++++- addons/core/Scripts/Game/ERR/10_AI/ERR_GarageVehicles.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c09ea8..634fc58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -Latest published Workshop version: **0.0.139** +Latest published Workshop version: **0.0.140** + +## 2026-11-05 — Garage vehicle access + +- Fixed garage vehicles refusing player entry because of civilian faction hostility. ## 2026-11-03 — Spectator body camera and player names diff --git a/addons/core/Scripts/Game/ERR/10_AI/ERR_GarageVehicles.c b/addons/core/Scripts/Game/ERR/10_AI/ERR_GarageVehicles.c index 0ec2ff2..965f73e 100644 --- a/addons/core/Scripts/Game/ERR/10_AI/ERR_GarageVehicles.c +++ b/addons/core/Scripts/Game/ERR/10_AI/ERR_GarageVehicles.c @@ -262,8 +262,8 @@ class ERR_GarageVehicles { ERR_Actors.DeleteSpawned(entity); if (m_PendingBike) m_BikeCandidate++; return; } - Faction civilian = GetGame().GetFactionManager().GetFactionByKey("CIV"); - if (civilian) ERR_Actors.SetFaction(vehicle, civilian); + // Empty vehicles start unaffiliated; vanilla assigns the first occupant's + // faction. Forcing CIV here can block player entry before that transfer. SCR_FuelManagerComponent fuel = SCR_FuelManagerComponent.Cast(vehicle.FindComponent(SCR_FuelManagerComponent)); if (fuel) fuel.SetTotalFuelPercentage(Math.RandomFloat(0.3, 0.8)); ERR_ParkedVehicle parked = new ERR_ParkedVehicle(); parked.Entity = vehicle; parked.Site = site; parked.Origin = m_Position;