Only count bullet hit that strike enemies, bosses, or destructables.

This commit is contained in:
Steve 2018-02-16 07:21:59 +00:00
parent e5976f04dd
commit bfef8560cc
3 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ static void touch(Entity *other)
b->alive = ALIVE_DEAD;
if (b->owner->type == world.bob->type)
if (b->owner->type == world.bob->type && (other->type == ET_ENEMY || other->type == ET_BOSS || other->type == ET_DESTRUCTABLE))
{
game.stats[STAT_SHOTS_HIT]++;
}

View File

@ -80,7 +80,7 @@ static void touch(Entity *other)
addSmallFleshChunk(b->x, b->y);
}
if (b->owner->type == world.bob->type)
if (b->owner->type == world.bob->type && (other->type == ET_ENEMY || other->type == ET_BOSS || other->type == ET_DESTRUCTABLE))
{
game.stats[STAT_SHOTS_HIT]++;
}

View File

@ -72,7 +72,7 @@ static void touch(Entity *other)
other->applyDamage(2);
swapSelf(other);
if (b->owner->type == world.bob->type)
if (b->owner->type == world.bob->type && (other->type == ET_ENEMY || other->type == ET_BOSS || other->type == ET_DESTRUCTABLE))
{
game.stats[STAT_SHOTS_HIT]++;
}