Core Game Loop Additions
This commit is contained in:
@@ -35,5 +35,9 @@ namespace ProjectM.Simulation
|
||||
|
||||
/// <summary>Integrated distance travelled (predicted on client + authoritative on server). Not replicated.</summary>
|
||||
public float DistanceTravelled;
|
||||
|
||||
/// <summary>This tick's travel step (Speed*dt), written by ProjectileMoveSystem so a plain-group harvest
|
||||
/// sweep is tunnelling-safe without depending on its own variable-frame clock. Server-local; not replicated.</summary>
|
||||
public float LastStep;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace ProjectM.Simulation
|
||||
.WithAll<Simulate>())
|
||||
{
|
||||
float step = projectile.ValueRO.Speed * dt;
|
||||
projectile.ValueRW.LastStep = step;
|
||||
float3 dir = new float3(projectile.ValueRO.Direction.x, 0f, projectile.ValueRO.Direction.y);
|
||||
|
||||
transform.ValueRW.Position += dir * step;
|
||||
|
||||
Reference in New Issue
Block a user