Various system spring cleaning (#36206)
* Various systems warnings cleanup * Last changes before submitting PR * Add guard for transform component, fix failing test * Small corrections * Audio params to specifiers datafields * Using audio params on components and configs
This commit is contained in:
@@ -59,14 +59,14 @@ public sealed class FloorTileSystem : EntitySystem
|
||||
|
||||
// this looks a bit sussy but it might be because it needs to be able to place off of grids and expand them
|
||||
var location = args.ClickLocation.AlignWithClosestGridTile();
|
||||
var locationMap = location.ToMap(EntityManager, _transform);
|
||||
var locationMap = _transform.ToMapCoordinates(location);
|
||||
if (locationMap.MapId == MapId.Nullspace)
|
||||
return;
|
||||
|
||||
var physicQuery = GetEntityQuery<PhysicsComponent>();
|
||||
var transformQuery = GetEntityQuery<TransformComponent>();
|
||||
|
||||
var map = location.ToMap(EntityManager, _transform);
|
||||
var map = _transform.ToMapCoordinates(location);
|
||||
|
||||
// Disallow placement close to grids.
|
||||
// FTLing close is okay but this makes alignment too finnicky.
|
||||
@@ -92,7 +92,7 @@ public sealed class FloorTileSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
var userPos = transformQuery.GetComponent(args.User).Coordinates.ToMapPos(EntityManager, _transform);
|
||||
var userPos = _transform.ToMapCoordinates(transformQuery.GetComponent(args.User).Coordinates).Position;
|
||||
var dir = userPos - map.Position;
|
||||
var canAccessCenter = false;
|
||||
if (dir.LengthSquared() > 0.01)
|
||||
|
||||
Reference in New Issue
Block a user