Various sharedsystem spring cleaning (#36200)
* Various shared system warnings cleanup * More shared system warnings cleanup * Rearranging changes * Using correct transform for unbuckle * Small changes * Revert buckle change * Update Content.Shared/Ghost/SharedGhostSystem.cs --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -279,14 +279,14 @@ public abstract class SharedMagicSystem : EntitySystem
|
||||
var userVelocity = _physics.GetMapLinearVelocity(ev.Performer);
|
||||
|
||||
// If applicable, this ensures the projectile is parented to grid on spawn, instead of the map.
|
||||
var fromMap = fromCoords.ToMap(EntityManager, _transform);
|
||||
var fromMap = _transform.ToMapCoordinates(fromCoords);
|
||||
var spawnCoords = _mapManager.TryFindGridAt(fromMap, out var gridUid, out _)
|
||||
? fromCoords.WithEntityId(gridUid, EntityManager)
|
||||
? _transform.WithEntityId(fromCoords, gridUid)
|
||||
: new(_mapManager.GetMapEntityId(fromMap.MapId), fromMap.Position);
|
||||
|
||||
var ent = Spawn(ev.Prototype, spawnCoords);
|
||||
var direction = toCoords.ToMapPos(EntityManager, _transform) -
|
||||
spawnCoords.ToMapPos(EntityManager, _transform);
|
||||
var direction = _transform.ToMapCoordinates(toCoords).Position -
|
||||
_transform.ToMapCoordinates(spawnCoords).Position;
|
||||
_gunSystem.ShootProjectile(ent, direction, userVelocity, ev.Performer, ev.Performer);
|
||||
}
|
||||
// End Projectile Spells
|
||||
|
||||
Reference in New Issue
Block a user