Fix garage vehicle faction access; record Workshop 0.0.140
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-11-05 10:00:12 +01:00
parent 828bb0a1a7
commit 9418b6950a
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -1,6 +1,10 @@
# Changelog # 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 ## 2026-11-03 — Spectator body camera and player names
@@ -262,8 +262,8 @@ class ERR_GarageVehicles
{ {
ERR_Actors.DeleteSpawned(entity); if (m_PendingBike) m_BikeCandidate++; return; ERR_Actors.DeleteSpawned(entity); if (m_PendingBike) m_BikeCandidate++; return;
} }
Faction civilian = GetGame().GetFactionManager().GetFactionByKey("CIV"); // Empty vehicles start unaffiliated; vanilla assigns the first occupant's
if (civilian) ERR_Actors.SetFaction(vehicle, civilian); // faction. Forcing CIV here can block player entry before that transfer.
SCR_FuelManagerComponent fuel = SCR_FuelManagerComponent.Cast(vehicle.FindComponent(SCR_FuelManagerComponent)); SCR_FuelManagerComponent fuel = SCR_FuelManagerComponent.Cast(vehicle.FindComponent(SCR_FuelManagerComponent));
if (fuel) fuel.SetTotalFuelPercentage(Math.RandomFloat(0.3, 0.8)); 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; ERR_ParkedVehicle parked = new ERR_ParkedVehicle(); parked.Entity = vehicle; parked.Site = site; parked.Origin = m_Position;