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

@@ -164,14 +164,14 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
return _chamberContainer.ContainedEntity;
}
public override IEntity TakeProjectile(MapCoordinates spawnAt)
public override IEntity TakeProjectile(GridCoordinates spawnAtGrid, MapCoordinates spawnAtMap)
{
var chamberEntity = _chamberContainer.ContainedEntity;
if (_autoCycle)
{
Cycle();
}
return chamberEntity?.GetComponent<AmmoComponent>().TakeBullet(spawnAt);
return chamberEntity?.GetComponent<AmmoComponent>().TakeBullet(spawnAtGrid, spawnAtMap);
}
protected override bool WeaponCanFire()