Only count laser hits once.
This commit is contained in:
parent
f634a28127
commit
0c2f069fef
|
@ -141,6 +141,7 @@ enum
|
|||
#define EF_ALWAYS_PROCESS (2 << 16)
|
||||
#define EF_NO_TELEPORT (2 << 17)
|
||||
#define EF_NO_OBSERVE (2 << 18)
|
||||
#define EF_BULLET_HIT (2 << 19)
|
||||
|
||||
#define GRAVITY_POWER 0.5f
|
||||
#define FRICTION 0.75f
|
||||
|
|
|
@ -72,8 +72,9 @@ static void touch(Entity *other)
|
|||
other->applyDamage(2);
|
||||
swapSelf(other);
|
||||
|
||||
if (b->owner->type == world.bob->type && (other->type == ET_ENEMY || other->type == ET_BOSS || other->type == ET_DESTRUCTABLE))
|
||||
if (!(b->flags & EF_BULLET_HIT) && b->owner->type == world.bob->type && (other->type == ET_ENEMY || other->type == ET_BOSS || other->type == ET_DESTRUCTABLE))
|
||||
{
|
||||
b->flags |= EF_BULLET_HIT;
|
||||
game.stats[STAT_SHOTS_HIT]++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue