]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/bosses.cpp
Get rid of false positive warnings from cppcheck.
[quix0rs-blobwars.git] / src / bosses.cpp
index 3e4890b42c6242c6e17883f7f0ce1683809cfde1..385da517fc389a447f7dbe77fd47fb44324852c1 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004-2010 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -20,6 +21,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "bosses.h"
 
+// this is used exclusively by the bosses
+Boss *self;
+
 void tankBossLevel()
 {
        if (player.health < 1)
@@ -437,7 +441,7 @@ bool isCorrectShieldFrequency(Entity *bullet)
                Math::removeBit(&bullet->flags, ENT_WEIGHTLESS);
                Math::removeBit(&bullet->flags, ENT_BOUNCES);
                
-               audio.playSound(SND_RICO1, CH_ANY);
+               audio.playSound(SND_RICO1, CH_ANY, bullet->x);
                
                return false;
        }
@@ -484,7 +488,7 @@ void checkBossBulletCollisions(Entity *bullet)
                                if (!(self->flags & ENT_IMMUNE))
                                {
                                        self->health -= bullet->damage;
-                                       audio.playSound(SND_CLANG, CH_ANY);
+                                       audio.playSound(SND_CLANG, CH_ANY, bullet->x);
                                        addColorParticles(bullet->x, bullet->y, Math::rrand(25, 75), -1);
                                        Math::removeBit(&bullet->flags, ENT_SPARKS);
                                        Math::removeBit(&bullet->flags, ENT_PUFFS);