Relay vehicle controls; on shutdown tell players to reconnect (restart) instead of a final disconnect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 16:51:48 +02:00
co-authored by Claude Opus 5.5
parent 0f62c17c90
commit 53cda0cbc2
3 changed files with 8 additions and 4 deletions
+2
View File
@@ -128,6 +128,8 @@ try
Check(await bob.WaitFor(MsgType.WorldVars) != null, "Job/shop values are relayed");
alice.Send(MsgType.HingeStates, Wire.Build(w => { w.Write(0); }));
Check(await bob.WaitFor(MsgType.HingeStates) != null, "Car door angles are relayed");
alice.Send(MsgType.VehicleControls, Wire.Build(w => { w.Write(1); w.Write(123); w.Write("Lights"); }));
Check(await bob.WaitFor(MsgType.VehicleControls) != null, "Vehicle controls (ignition, lights ...) are relayed");
byte[] trafficPayload = Wire.Build(w => { w.Write(0); });
bob.Send(MsgType.TrafficStates, trafficPayload);
Check(await alice.WaitFor(MsgType.TrafficStates, 800) == null, "Traffic from a player who is not the world authority is ignored");