]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/tankBoss.cpp
Added .gitignore to ignore certain files + fixed access rights on Makefile* as
[quix0rs-blobwars.git] / src / tankBoss.cpp
index 05120f9ff4acae8d8c91f7677e7f7250d6eb31fb..4cda249e86d1335f53b7f535b2c86fe1d843aa92 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
@@ -91,7 +92,7 @@ void traceTankBossMGFireLine()
                dx = -1;
        }
        
-       int x = (int)self->x;
+       int x;
        int y = (int)self->y + 10;
        
        Entity *enemy = NULL;
@@ -172,7 +173,7 @@ void tankBossMGCannonChargeFire()
        if (self->custom == 0)
        {
                self->think = tankBossMGCannonFire;
-               audio.playSound(SND_BOSSCUSTOM2, CH_AMBIANCE);
+               audio.playSound(SND_BOSSCUSTOM2, CH_AMBIANCE, self->x);
        }
 }
 
@@ -266,7 +267,7 @@ void tankBossMGAttack()
                self->think = &tankBossMGCannonChargeFire;
                self->setThinkTime(0);
                self->setActionFinished(2);
-               audio.playSound(SND_BOSSCUSTOM1, CH_AMBIANCE);
+               audio.playSound(SND_BOSSCUSTOM1, CH_AMBIANCE, self->x);
                Math::addBit(&self->flags, ENT_IMMUNE);
        }
        else
@@ -382,7 +383,7 @@ void tankBossMGInit()
        debug(("tankBossMGInit\n"));
        
        map.boss[0] = new Boss();
-       strcpy(map.boss[0]->name, "BioMech Tank V1.1");
+       strlcpy(map.boss[0]->name, "BioMech Tank V1.1", sizeof map.boss[0]->name);
        map.boss[0]->health = 65 * game.skill;
        map.boss[0]->maxHealth = 65 * game.skill;
        map.boss[0]->setSprites(graphics.getSprite("BlobTankCannonRight", true), graphics.getSprite("BlobTankCannonLeft", true), graphics.getSprite("BlobTankCannonLeft", true));
@@ -399,8 +400,8 @@ void tankBossMGInit()
        map.boss[0]->die = &tankBossMGDie;
        Math::addBit(&map.boss[0]->flags, ENT_AIMS);
        
-       audio.loadSound(SND_BOSSCUSTOM1, "sound/tankBeam.wav");
-       audio.loadSound(SND_BOSSCUSTOM2, "sound/tankBeamFire.wav");
+       audio.loadSound(SND_BOSSCUSTOM1, "sound/tankBeam");
+       audio.loadSound(SND_BOSSCUSTOM2, "sound/tankBeamFire");
        
        map.setMainBossPart(map.boss[0]);
        
@@ -604,7 +605,7 @@ void tankBossGLInit()
        debug(("tankBossGLInit\n"));
        
        map.boss[1] = new Boss();
-       strcpy(map.boss[1]->name, "BioMech Tank V2.6");
+       strlcpy(map.boss[1]->name, "BioMech Tank V2.6", sizeof map.boss[1]->name);
        map.boss[1]->health = 65 * game.skill;
        map.boss[1]->maxHealth = 65 * game.skill;
        map.boss[1]->setSprites(graphics.getSprite("BlobTankGrenadeRight", true), graphics.getSprite("BlobTankGrenadeLeft", true), graphics.getSprite("BlobTankGrenadeLeft", true));