From e41533ee946f35facf984f264b9e3a050895f8ab Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Wed, 5 Jan 2022 13:52:40 +0100 Subject: spawn not random anymore. this got a whole bunch harder --- src/weapon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/weapon.cpp') 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); } } -- cgit v1.2.3