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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user