]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/mias.cpp
Allow playing sounds with stereo effects.
[quix0rs-blobwars.git] / src / mias.cpp
index 2415a3c8835709330dcf93d7fbffb770077a80d5..25d093b833b620b6942c04923afc73b8fa36bacf 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,20 +23,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 void initMIAPhrases()
 {
-       strncpy(mia_scared[0], "help me...", sizeof mia_scared[0]);
-       strncpy(mia_scared[1], "i don't wanna die...", sizeof mia_scared[1]);
-       strncpy(mia_scared[2], "please... someone help...", sizeof mia_scared[2]);
-       strncpy(mia_scared[3], "i... i'm scared...", sizeof mia_scared[3]);
-       strncpy(mia_scared[4], "i wanna go home...", sizeof mia_scared[4]);
-       strncpy(mia_scared[5], "what was that?!", sizeof mia_scared[5]);
-       strncpy(mia_scared[6], "i don't like it here...", sizeof mia_scared[6]);
+       strlcpy(mia_scared[0], "help me...", sizeof mia_scared[0]);
+       strlcpy(mia_scared[1], "i don't wanna die...", sizeof mia_scared[1]);
+       strlcpy(mia_scared[2], "please... someone help...", sizeof mia_scared[2]);
+       strlcpy(mia_scared[3], "i... i'm scared...", sizeof mia_scared[3]);
+       strlcpy(mia_scared[4], "i wanna go home...", sizeof mia_scared[4]);
+       strlcpy(mia_scared[5], "what was that?!", sizeof mia_scared[5]);
+       strlcpy(mia_scared[6], "i don't like it here...", sizeof mia_scared[6]);
 }
 
 void addMIA(const char *name, int x, int y, int type)
 {
        Entity *mia = new Entity();
 
-       strncpy(mia->name, name, sizeof mia->name);
+       strlcpy(mia->name, name, sizeof mia->name);
        mia->id = type;
        mia->baseThink = 60;
        mia->health = 180;
@@ -62,7 +63,7 @@ void doMIAs()
 
        int x, y;
 
-       char message[100];
+       char message[256];
 
        while (mia->next != NULL)
        {