aboutsummaryrefslogtreecommitdiff
path: root/src/entities/antifaShip.c
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-11-15 16:25:54 -0700
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-11-15 16:25:54 -0700
commit581ea4aaf1acefa663446faa32a480bbcc3e084c (patch)
tree47e05bab3da699d707d0af089f8b8287fbda38fd /src/entities/antifaShip.c
parent22535c8b18cda1d5a1ee771616425fc3941a801c (diff)
Kill log only shows stuff you killed
Diffstat (limited to 'src/entities/antifaShip.c')
-rw-r--r--src/entities/antifaShip.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/entities/antifaShip.c b/src/entities/antifaShip.c
index b90060e..1ba8db9 100644
--- a/src/entities/antifaShip.c
+++ b/src/entities/antifaShip.c
@@ -152,17 +152,16 @@ void fireBulletAntifa(Game * game, Entity * entity) {
if (t - data->timeSinceLastBullet < ANTIFA_BULLET_COOLDOWN)
return;
- puts("shoot shoot");
-
- Bullet bullet = createBulletFromDirection(*entity, data->gunTarget, 1.0);
+ Bullet bullet = createBulletFromDirection(*entity, data->gunTarget, ANTIFA_BULLET_DAMAGE);
BulletHitInfo info = shootBullet(&game->world, bullet);
data->lastBulletShot = bullet;
if (info.hit) {
Entity * hitEntity = getEntityFromWorld(game->world, info.hitId);
- printVector3(hitEntity->position);
- } else {
- puts("you stink");
+
+ // We were the fucker that killed this low iq fascist!
+ if (hitEntity->health <= 0.0)
+ hitEntity->killedByPlayer = true;
}
data->timeSinceLastBullet = t;