]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/explosions.cpp
Get rid of false positive warnings from cppcheck.
[quix0rs-blobwars.git] / src / explosions.cpp
index c5df00f26081bd3dc27a4c48fe82f149d2d1afee..86e119832fbc71889d6f4ab01bb26d9666f5dc09 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 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
@@ -22,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 void addExplosion(float x, float y, int radius, Entity *owner)
 {
-       audio.playSound(SND_GRENADE, CH_EXPLODE);
+       audio.playSound(SND_GRENADE, CH_EXPLODE, x);
 
        float dx, dy;
        int distX, distY;
@@ -77,20 +78,20 @@ void addExplosion(float x, float y, int radius, Entity *owner)
                                {
                                        if (enemy->flags & ENT_EXPLODES)
                                        {
-                                               audio.playSound(SND_ELECDEATH1 + Math::prand() % 3, CH_DEATH);
+                                               audio.playSound(SND_ELECDEATH1 + Math::prand() % 3, CH_DEATH, enemy->x);
                                        }
                                        else
                                        {
                                                if (game.gore)
                                                {
-                                                       audio.playSound(SND_DEATH1 + Math::prand() % 3, CH_DEATH);
+                                                       audio.playSound(SND_DEATH1 + Math::prand() % 3, CH_DEATH, enemy->x);
                                                }
                                        }
                                }
                                
                                if (owner == &player)
                                {
-                                       game.score += enemy->value;
+                                       addPlayerScore(enemy->value);
                                }
                        }