From a9fa439d8412b2c682d512bfe9cc9322caa4336e Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 7 Jan 2022 16:01:07 +0100 Subject: adjust boss hp and add back fury --- src/wp_assaultrifle.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/wp_assaultrifle.cpp') diff --git a/src/wp_assaultrifle.cpp b/src/wp_assaultrifle.cpp index 7438b23..6b9a2c7 100644 --- a/src/wp_assaultrifle.cpp +++ b/src/wp_assaultrifle.cpp @@ -12,7 +12,7 @@ wp_assaultrifle::wp_assaultrifle(const char *s, const char *r) -int wp_assaultrifle::bang(std::vector * enemies, Vector2 playerDirection, Vector2 playerPosition, int * victims) +int wp_assaultrifle::bang(std::vector * enemies, Entity * player) { if (barrel == 0) { @@ -22,6 +22,8 @@ int wp_assaultrifle::bang(std::vector * enemies, Vector2 playerDirection PlaySound(shot); // here // + Vector2 playerDirection = player->direction; + Vector2 playerPosition = (Vector2){player->posX, player->posY}; auto rot1 = Vector2Rotate(playerDirection, -0.2f); auto rot2 = Vector2Rotate(playerDirection, 0.2f); @@ -29,8 +31,8 @@ int wp_assaultrifle::bang(std::vector * enemies, Vector2 playerDirection auto add2 = Vector2Add(playerPosition, rot2); auto r = playerDirection; - r.x *= 2; - r.y *= 2; + r.x *= 4; + r.y *= 4; for (auto en = enemies->begin(); en != enemies->end(); en++) { @@ -45,7 +47,9 @@ int wp_assaultrifle::bang(std::vector * enemies, Vector2 playerDirection en->direction.x = (playerDirection.x / 2); en->direction.y = (playerDirection.y / 2); } - *victims += 1; + player->victims += 1; + player->fury += 1; + break ; } } // assaultrifle cone -- cgit v1.2.3