/*
-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
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;
int x, y;
- char message[100];
+ char message[256];
while (mia->next != NULL)
{
{
Math::addBit(&mia->flags, ENT_WEIGHTLESS);
Math::addBit(&mia->flags, ENT_DYING);
- audio.playSound(SND_TELEPORT1, CH_ANY);
+ audio.playSound(SND_TELEPORT1, CH_ANY, mia->x);
}
}