PROJECT RV Interior —UpdadetePos Fix Patch
О материале
«PROJECT RV Interior —UpdadetePos Fix Patch» — материал мастерской Project Zomboid. Карты, транспорт, оружие и моды для выживания. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
⚠ IMPORTANT NOTICE This is a temporary patch mod. Once the fixes described below are incorporated into the official PROJECT RV Interior, this mod will be deleted. Remove it from your mod list as soon as the base mod is updated.
PROJECT RV Interior —UpdadetePos Fix Patch
Fixes three independent bugs in PROJECT RV Interior that cause server errors and incorrect behaviour when entering and exiting the RV interior.
Bug 1 — NullPointerException on generator placement (UpdateGen)
Problem: the RV interior room needs a functional [c]IsoGenerator[/c] world object placed at a specific square to supply electricity to connected devices (separate from the visual generator that is part of the vehicle model). On the first entry, no such object exists yet — the game creates one and calls [c]AddSpecialObject[/c] to register it. That method internally accesses [c]square.chunk.loadedBits[/c] — if the chunk has not yet been loaded by the engine at that moment, Java throws a [c]NullPointerException[/c] that spams the server log. On subsequent entries the object already exists and is only reconfigured, so the NPE only occurs on the first entry per session.
The fixed 150-tick delay in the original code does not guarantee the chunk will be ready in time.
Additionally, [c]IsoGenerator.new(cell)[/c] referenced a variable [c]cell[/c] that was not defined in the local scope, silently passing [c]nil[/c].
Fix:
-
After the initial 150 ticks, checks every tick whether the chunk is loaded via [c]cell:getChunk(chunkX, chunkY)[/c]
-
Retries for up to 300 extra ticks (~5 seconds). If the chunk never loads, gives up silently
-
[c]IsoGenerator.new(cell)[/c] now correctly calls [c]getCell()[/c]
Bug 2 — Stale vehicle exit position (UpdateVehiclePos)
Problem: when exiting the RV interior, the game needs to know the vehicle's current position to teleport the player back. The original approach sent position updates from client to server every minute, with several issues:
-
The command fired for every client seated in any vehicle, not just RV vehicles
-
The recorded position could be up to 1 minute out of date
-
Data was written to GlobalModData without ever calling [c]ModData.transmit[/c], leaving clients with stale information
-
If all players were inside the RV interior (nobody in the driver seat), no updates were sent at all and the position was frozen at entry time
Fix:
-
The server stores a live reference to the [c]IsoVehicle[/c] Java object at entry time
-
On exit, position is read directly from that object — always exact, zero network traffic
-
A server-side flush every 10 minutes keeps GlobalModData reasonably current as a crash/restart fallback
-
The [c]UpdateVehPos[/c] client→server command is disabled entirely
Requirements
- PROJECT RV Interior — must be active and loaded before this mod
Patch built for Build 42. Does not affect existing saves.
Workshop ID: 3725024999 Mod ID: RVpatchfix
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.