--- deliantra/server/include/face.h 2008/07/29 02:00:55 1.26
+++ deliantra/server/include/face.h 2009/11/15 18:03:59 1.31
@@ -1,22 +1,21 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
*
- * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
- * Copyright (©) 1994,2007 Mark Wedel
- * Copyright (©) 1992,2007 Frank Tore Johansen
+ * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
*
- * Deliantra is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * Deliantra is free software: you can redistribute it and/or modify it under
+ * the terms of the Affero GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * You should have received a copy of the Affero GNU General Public License
+ * and the GNU General Public License along with this program. If not, see
+ * .
*
* The authors can be reached via e-mail to
*/
@@ -27,7 +26,7 @@
#include
#include
-#define CHKSUM_SIZE 6
+#define CHKSUM_MAXLEN 15
#define MAX_FACES 10000 // stupid gcfclient artificially limits
typedef uint16 faceidx;
@@ -37,7 +36,8 @@
struct facedata
{
std::string data;
- uint8 chksum[CHKSUM_SIZE];
+ uint8 chksum[CHKSUM_MAXLEN];
+ uint8 chksum_len;
};
/* New face structure - this enforces the notion that data is face by
@@ -66,9 +66,12 @@
};
inline void
-object_freezer::put (keyword k, faceinfo *v)
+object_freezer::put (const keyword_string k, faceinfo *v)
{
- put (k, v ? &v->name : (const char *)0);
+ if (expect_true (v))
+ put (k, v->name);
+ else
+ put (k);
}
typedef std::tr1::unordered_map > > facehash_t;
@@ -114,7 +117,6 @@
typedef std::tr1::unordered_map > > animhash_t;
-extern animhash_t animhash;
extern std::vector animations;
#endif