diff options
author | nathansmithsmith <nathansmith7@mailfence.com> | 2023-11-10 12:19:50 -0700 |
---|---|---|
committer | nathansmithsmith <nathansmith7@mailfence.com> | 2023-11-10 12:19:50 -0700 |
commit | 9588ded8d76e720299ad9d1b254409e715164b81 (patch) | |
tree | 8f1bac1e904e83b777dc7ab8f3e96e5f83d66465 /src/entities/soldato.c | |
parent | ac7470ce5d680caa7fb53c235aea10cba45e1836 (diff) |
Making changes to the guns and fine tuning
Diffstat (limited to 'src/entities/soldato.c')
-rw-r--r-- | src/entities/soldato.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/entities/soldato.c b/src/entities/soldato.c index 3f548ac..7318d5b 100644 --- a/src/entities/soldato.c +++ b/src/entities/soldato.c @@ -119,14 +119,12 @@ void updateSoldatoGuns(Game * game, Entity * entity) { if (t - data->timeSinceLastShot < SOLDATO_COOLDOWN) return; - // Shoot if in range. - if (Vector3Distance(entity->position, player->position) <= SOLDATO_GUN_MAX_RANGE) { - Bullet bullet = createBulletFromDirection(*entity, data->gunTarget, SOLDATO_BULLET_DAMAGE); - BulletHitInfo hit = shootBulletAtEntity(player, bullet); + // Shoot this fucker. + Bullet bullet = createBulletFromDirection(*entity, data->gunTarget, SOLDATO_BULLET_DAMAGE); + BulletHitInfo hit = shootBulletAtEntity(player, bullet); - if (hit.hit) - printf("This fucker hit %lf\n", t); - } + if (hit.hit) + printf("This fucker hit %lf\n", t); data->timeSinceLastShot = t; } @@ -154,12 +152,14 @@ void drawSoldato(Game * game, Entity * entity) { entityDraw(entity); // Debug gun. + /* Soldato * data = (Soldato*)entity->data; DrawLine3D( entity->position, Vector3Add(entity->position, Vector3Scale(data->gunTarget, SOLDATO_GUN_MAX_RANGE)), BLUE ); + */ /* Entity * leader; |