Projectiles Now check for Hard (#1397)
This commit is contained in:
@@ -63,6 +63,15 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
/// <param name="entity"></param>
|
||||
void ICollideBehavior.CollideWith(IEntity entity)
|
||||
{
|
||||
// This is so entities that shouldn't get a collision are ignored.
|
||||
if (entity.TryGetComponent(out ICollidableComponent collidable) && collidable.Hard == false)
|
||||
{
|
||||
_deleteOnCollide = false;
|
||||
return;
|
||||
}
|
||||
else
|
||||
_deleteOnCollide = true;
|
||||
|
||||
if (_soundHitSpecies != null && entity.HasComponent<SpeciesComponent>())
|
||||
{
|
||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundHitSpecies, entity.Transform.GridPosition);
|
||||
|
||||
Reference in New Issue
Block a user