Only count bullet hit that strike enemies, bosses, or destructables.
This commit is contained in:
parent
e5976f04dd
commit
bfef8560cc
|
@ -116,7 +116,7 @@ static void touch(Entity *other)
|
||||||
|
|
||||||
b->alive = ALIVE_DEAD;
|
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]++;
|
game.stats[STAT_SHOTS_HIT]++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ static void touch(Entity *other)
|
||||||
addSmallFleshChunk(b->x, b->y);
|
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]++;
|
game.stats[STAT_SHOTS_HIT]++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ static void touch(Entity *other)
|
||||||
other->applyDamage(2);
|
other->applyDamage(2);
|
||||||
swapSelf(other);
|
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]++;
|
game.stats[STAT_SHOTS_HIT]++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue