aboutsummaryrefslogtreecommitdiffstats
path: root/src/weapon.cpp
diff options
context:
space:
mode:
authorsalaaad2 <arthurdurant263@gmail.com>2022-01-05 13:52:40 +0100
committersalaaad2 <arthurdurant263@gmail.com>2022-01-05 13:52:40 +0100
commite41533ee946f35facf984f264b9e3a050895f8ab (patch)
treed89ee411b26c5d7cc0f1be64431dfb62c1259b56 /src/weapon.cpp
parentadd fury, bang sound, colors and more (diff)
downloadthreshold-e41533ee946f35facf984f264b9e3a050895f8ab.tar.gz
threshold-e41533ee946f35facf984f264b9e3a050895f8ab.tar.bz2
threshold-e41533ee946f35facf984f264b9e3a050895f8ab.tar.xz
threshold-e41533ee946f35facf984f264b9e3a050895f8ab.tar.zst
threshold-e41533ee946f35facf984f264b9e3a050895f8ab.zip
spawn not random anymore. this got a whole bunch harder
Diffstat (limited to 'src/weapon.cpp')
-rw-r--r--src/weapon.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/weapon.cpp b/src/weapon.cpp
index a516fdc..3f5dcec 100644
--- a/src/weapon.cpp
+++ b/src/weapon.cpp
@@ -16,7 +16,7 @@ Weapon::Weapon(float const & rg, unsigned int const & dmg, const char *s, const
reload = LoadSound(r);
SetSoundVolume(shot, 0.3f);
SetSoundVolume(reload, 0.3f);
- max = barrel = 20;
+ max = barrel = 200;
}
Weapon::~Weapon() {}
@@ -31,8 +31,10 @@ int Weapon::bang()
if (barrel == 0)
{
refill();
+ return (1);
} else {
barrel--;
PlaySound(shot);
+ return (0);
}
}