Makes weapons use GridCoordinates and default to MapCoordinates if grid is invalid

This commit is contained in:
Víctor Aguilera Puerto
2020-07-10 01:53:36 +02:00
parent e54e708cf2
commit 8785371563
7 changed files with 17 additions and 15 deletions

View File

@@ -184,7 +184,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
return BoltOpen ? null : _chamberContainer.ContainedEntity;
}
public override IEntity TakeProjectile(MapCoordinates spawnAt)
public override IEntity TakeProjectile(GridCoordinates spawnAtGrid, MapCoordinates spawnAtMap)
{
if (BoltOpen)
{
@@ -193,7 +193,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
var entity = _chamberContainer.ContainedEntity;
Cycle();
return entity?.GetComponent<AmmoComponent>().TakeBullet(spawnAt);
return entity?.GetComponent<AmmoComponent>().TakeBullet(spawnAtGrid, spawnAtMap);
}
private void Cycle(bool manual = false)