diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-07 16:01:07 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-07 16:01:07 +0100 |
commit | a9fa439d8412b2c682d512bfe9cc9322caa4336e (patch) | |
tree | f33d1441c79d23faaade744a7f1d2ba718562fbb /src/wp_assaultrifle.cpp | |
parent | references are weaird, man (diff) | |
download | threshold-a9fa439d8412b2c682d512bfe9cc9322caa4336e.tar.gz threshold-a9fa439d8412b2c682d512bfe9cc9322caa4336e.tar.bz2 threshold-a9fa439d8412b2c682d512bfe9cc9322caa4336e.tar.xz threshold-a9fa439d8412b2c682d512bfe9cc9322caa4336e.tar.zst threshold-a9fa439d8412b2c682d512bfe9cc9322caa4336e.zip |
adjust boss hp and add back fury
Diffstat (limited to 'src/wp_assaultrifle.cpp')
-rw-r--r-- | src/wp_assaultrifle.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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<Entity> * enemies, Vector2 playerDirection, Vector2 playerPosition, int * victims) +int wp_assaultrifle::bang(std::vector<Entity> * enemies, Entity * player) { if (barrel == 0) { @@ -22,6 +22,8 @@ int wp_assaultrifle::bang(std::vector<Entity> * 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<Entity> * 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<Entity> * 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 |