Cut 5c-1: Multi-human authoritative sim, SimSnapshot/SimEvent boundary, RustToDust.Net & RustToDust.Server
This commit is contained in:
parent
8eba2ea39f
commit
d8f5c49b8d
34 changed files with 5785 additions and 700 deletions
|
|
@ -118,7 +118,7 @@ namespace RustToDust.Tests
|
|||
[Fact]
|
||||
public void ArenaSession_SionLoadsHeightfieldAndMeshesSpawnsClearBlocksLosAndStepsCleanly()
|
||||
{
|
||||
using var session = new ArenaSession(seed: 42, ArenaMapKind.Sion);
|
||||
using var session = new ArenaSession(seed: 42, ArenaMapKind.Sion, slot0Human: true);
|
||||
var state = session.State;
|
||||
var sion = state.SionMap!;
|
||||
|
||||
|
|
@ -186,12 +186,12 @@ namespace RustToDust.Tests
|
|||
$"Expected HasLineOfSight above Sion building {tb.Id} roof ({tb.RoofY:F1}m) to be clear");
|
||||
|
||||
// Step 180 ticks (3 seconds) driving & firing: zero NaNs, zero underground falls, player moves cleanly
|
||||
var player = state.Player;
|
||||
var player = state.Contenders[0];
|
||||
float pStartX = player.X;
|
||||
float pStartZ = player.Z;
|
||||
for (int tick = 0; tick < 180; tick++)
|
||||
{
|
||||
session.Step(new PlayerInput(
|
||||
session.SetHumanInput(0, new PlayerInput(
|
||||
Throttle: 1f,
|
||||
Steer: MathF.Sin(tick * 0.04f) * 0.25f,
|
||||
AimWorldX: player.X + MathF.Sin(player.Yaw) * 60f,
|
||||
|
|
@ -199,6 +199,7 @@ namespace RustToDust.Tests
|
|||
Fire: tick % 10 == 0,
|
||||
InteractPickup: false,
|
||||
Brake: false));
|
||||
session.Step();
|
||||
|
||||
for (int cIdx = 0; cIdx < state.Contenders.Count; cIdx++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue