MapManager warning cleanup shared edition (#36795)
* cleanup and reworking * one of these days I'll merge a conflict without breaking shit. * Update Content.Shared/Shuttles/Systems/SharedShuttleSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Shared/Tabletop/SharedTabletopSystem.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * I'm gonna send this but... I'll be honest, I dunno what it does. * fix coordinates --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -276,13 +276,9 @@ public abstract class SharedMagicSystem : EntitySystem
|
||||
|
||||
// If applicable, this ensures the projectile is parented to grid on spawn, instead of the map.
|
||||
var fromMap = _transform.ToMapCoordinates(fromCoords);
|
||||
var spawnCoords = _mapManager.TryFindGridAt(fromMap, out var gridUid, out _)
|
||||
? _transform.WithEntityId(fromCoords, gridUid)
|
||||
: new(_mapManager.GetMapEntityId(fromMap.MapId), fromMap.Position);
|
||||
|
||||
var ent = Spawn(ev.Prototype, spawnCoords);
|
||||
var ent = Spawn(ev.Prototype, fromMap);
|
||||
var direction = _transform.ToMapCoordinates(toCoords).Position -
|
||||
_transform.ToMapCoordinates(spawnCoords).Position;
|
||||
fromMap.Position;
|
||||
_gunSystem.ShootProjectile(ent, direction, userVelocity, ev.Performer, ev.Performer);
|
||||
}
|
||||
// End Projectile Spells
|
||||
|
||||
Reference in New Issue
Block a user