Store job/shop values and vehicle switch states for late joiners (2.9.2)

WorldVars and VehicleControls were only relayed; players joining later only
got them with the next save pull. They are now stored in world.json (cleared
with a new save) and appended to the world snapshot (old clients ignore it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 14:11:05 +02:00
co-authored by Claude Opus 5.5
parent 48446c46db
commit 06a58e08d5
4 changed files with 77 additions and 1 deletions
+2
View File
@@ -448,6 +448,8 @@ public sealed class GameServer
case MsgType.MoneyDelta: world.ApplyMoney(m.Payload); break;
case MsgType.DoorState: world.ApplyDoor(m.Payload); break;
case MsgType.VarSync: world.ApplyVars(m.Payload); break;
case MsgType.WorldVars: world.ApplyJobVars(m.Payload); break;
case MsgType.VehicleControls: world.ApplyControls(m.Payload); break;
case MsgType.SpawnItem:
if (!c.IsAdmin) return; // nur Admins dürfen Items spawnen
world.AddSpawn(m.Payload);