aboutsummaryrefslogtreecommitdiff
path: root/src/entities/guidedMissile.c
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-09-13 18:34:03 -0600
committernathansmithsmith <nathansmith7@mailfence.com>2023-09-13 18:34:03 -0600
commit3b22489413553e837a7da437b2c3cd69823095ab (patch)
tree903c69c5f0ada44e915212657eb97d082c8dbd00 /src/entities/guidedMissile.c
parent7d4d948dfa92416c802229b1c444a44785ee2a0c (diff)
maresciallo gun and missile stuff in different procedures
Diffstat (limited to 'src/entities/guidedMissile.c')
-rw-r--r--src/entities/guidedMissile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/entities/guidedMissile.c b/src/entities/guidedMissile.c
index b7f6b68..cd5bbe1 100644
--- a/src/entities/guidedMissile.c
+++ b/src/entities/guidedMissile.c
@@ -24,7 +24,7 @@ void initGuidedMissile(Entity * entity, Game * game) {
.controller.bangbang.speed = 80,
.controller.bangbang.stopAt = 0.0,
.controlType = ENTITY_FLY_TO_POINT_BANG_BANG,
- .rotationSpeed = 20.0,
+ .rotationSpeed = 10.0,
.applyRotation = true
};
}
@@ -73,7 +73,7 @@ void guidedMissileGoBoomBoom(Game * game, Entity * entity) {
// Get player distance and get the damage the missile will do.
float distance = Vector3Distance(player->position, entity->position);
- float damage = distance * GUIDED_MISSILE_DAMAGE;
+ float damage = fabsf(GUIDED_MISSILE_DAMAGE - (distance * GUIDED_MISSILE_BOOM_DISTANCE_MOD));
// Hurt this mother fucker.
player->health -= damage;