Content fixes for timeoffsets (#15934)

This commit is contained in:
metalgearsloth
2023-05-01 14:49:25 +10:00
committed by GitHub
parent 2cf883b56a
commit d51d74d934
18 changed files with 53 additions and 63 deletions

View File

@@ -158,7 +158,7 @@ public sealed partial class GunSystem : SharedGunSystem
}
// Define target coordinates relative to gun entity, so that network latency on moving grids doesn't fuck up the target location.
var coordinates = EntityCoordinates.FromMap(entity, mousePos, Transform, EntityManager);
var coordinates = EntityCoordinates.FromMap(entity, mousePos, TransformSystem, EntityManager);
Sawmill.Debug($"Sending shoot request tick {Timing.CurTick} / {Timing.CurTime}");
@@ -175,7 +175,7 @@ public sealed partial class GunSystem : SharedGunSystem
// Rather than splitting client / server for every ammo provider it's easier
// to just delete the spawned entities. This is for programmer sanity despite the wasted perf.
// This also means any ammo specific stuff can be grabbed as necessary.
var direction = fromCoordinates.ToMapPos(EntityManager, Transform) - toCoordinates.ToMapPos(EntityManager, Transform);
var direction = fromCoordinates.ToMapPos(EntityManager, TransformSystem) - toCoordinates.ToMapPos(EntityManager, TransformSystem);
foreach (var (ent, shootable) in ammo)
{