Port ranged weapons to EntityCoordinates correctly.

This commit is contained in:
Víctor Aguilera Puerto
2020-10-17 00:44:22 +02:00
parent b4ea6857cd
commit 524229d4b4
7 changed files with 15 additions and 18 deletions

View File

@@ -107,7 +107,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
}
}
public IEntity TakeBullet(EntityCoordinates spawnAtGrid, MapCoordinates spawnAtMap)
public IEntity TakeBullet(EntityCoordinates spawnAt)
{
if (_ammoIsProjectile)
{
@@ -125,9 +125,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition
appearanceComponent.SetData(AmmoVisuals.Spent, true);
}
var entity = spawnAtGrid.GetGridId(_entityManager) != GridId.Invalid
? Owner.EntityManager.SpawnEntity(_projectileId, spawnAtGrid)
: Owner.EntityManager.SpawnEntity(_projectileId, spawnAtMap);
var entity = Owner.EntityManager.SpawnEntity(_projectileId, spawnAt);
DebugTools.AssertNotNull(entity);
return entity;