]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CWeapon.cpp
Capitalize Makefiles.
[quix0rs-blobwars.git] / src / CWeapon.cpp
index 0fecc46541825e493656decbc73a4a522f7851c6..e0fc21644e0dbfd63a817c9106cffc15d3c48adb 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.
 
 Weapon::Weapon()
 {
-       strcpy(name, "");
+       name[0] = 0;
        id = 0;
        damage = 0;
        reload = 0;
@@ -34,10 +35,10 @@ Weapon::Weapon()
 
 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));
 }