aboutsummaryrefslogtreecommitdiffstats
path: root/src/wp_assaultrifle.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-17 01:31:38 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-17 01:31:38 +0100
commitc8b23f73e44fd5be7d653cc82e89212da4e5bc72 (patch)
treeb6f215212227ea4c2ffd079d52553078ee9f1ea8 /src/wp_assaultrifle.cpp
parentwhat ? (diff)
downloadthreshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.gz
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.bz2
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.xz
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.tar.zst
threshold-c8b23f73e44fd5be7d653cc82e89212da4e5bc72.zip
buff shotty & audio is now working I guess ???? ?
Diffstat (limited to '')
-rw-r--r--src/wp_assaultrifle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wp_assaultrifle.cpp b/src/wp_assaultrifle.cpp
index 41a3c91..0be3d5b 100644
--- a/src/wp_assaultrifle.cpp
+++ b/src/wp_assaultrifle.cpp
@@ -7,7 +7,7 @@
#include "entity.hpp"
wp_assaultrifle::wp_assaultrifle(const char* s, const char* r)
- : AWeapon(300.0f, 10, 30, 0.0, s, r, "ar") {}
+ : AWeapon(300.0f, 1, 30, 0.0, s, r, "ar") {}
int wp_assaultrifle::bang(std::vector<Entity>* enemies, Entity* player) {
if (barrel == 0) {
@@ -43,7 +43,7 @@ int wp_assaultrifle::bang(std::vector<Entity>* enemies, Entity* player) {
playerPosition, add2,
(en->radius * 2))) { // enemy hit
std::cout << "hit" << std::endl;
- en->hp--;
+ en->hp -= damage;
if (en->hp == 0) {
en->direction.x = (playerDirection.x / 2);
en->direction.y = (playerDirection.y / 2);