/*
-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
Weapon::Weapon()
{
- strcpy(name, "");
+ name[0] = 0;
id = 0;
damage = 0;
reload = 0;
void Weapon::setName(const char *name)
{
- strcpy(this->name, name);
+ strlcpy(this->name, name, sizeof this->name);
}
-int Weapon::getSpeed(int face)
+int Weapon::getSpeed(int face) const
{
return (dx - ((dx * 2) * face));
}