--- deliantra/server/common/arch.C 2007/06/07 18:55:24 1.65
+++ deliantra/server/common/arch.C 2007/07/01 05:00:17 1.68
@@ -1,23 +1,22 @@
/*
- * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game.
+ * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
*
* Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
* Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * Crossfire TRT 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 2 of the License, or (at your option)
- * any later version.
+ * Crossfire TRT 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.
*
- * 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.
+ * 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 Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*
* The authors can be reached via e-mail to
*/
@@ -71,7 +70,7 @@
shstr_cmp name_cmp (name);
for_all_archetypes (at)
- if (at->archname == name_cmp)
+ if (at->name == name_cmp)
return at;
return 0;
@@ -88,7 +87,7 @@
shstr_cmp name_cmp (name);
for_all_archetypes (at)
- if (at->archname == name_cmp && at->type == type)
+ if (at->name == name_cmp && at->type == type)
return at;
return 0;
@@ -445,6 +444,14 @@
{
archetype *at = *p;
+ // some flags get inherited formt he head (probably a lot more)
+ // doing it here doesn't feel too cozy, but it allows code
+ // to ignore head checks for these flags, which saves time
+ at->flag [FLAG_ALIVE] = new_head->flag [FLAG_ALIVE];
+ at->flag [FLAG_NO_PICK] = new_head->flag [FLAG_NO_PICK];
+ at->flag [FLAG_MONSTER] = new_head->flag [FLAG_MONSTER];
+ at->flag [FLAG_IS_FLOOR] = new_head->flag [FLAG_IS_FLOOR];
+
if (at->x < new_head->min_x) new_head->min_x = at->x;
if (at->y < new_head->min_y) new_head->min_y = at->y;
if (at->x > new_head->max_x) new_head->max_x = at->x;
@@ -522,7 +529,7 @@
abort ();
char buf[MAX_BUF];
- sprintf (buf, "bug, please report (%s)", ARCH_SINGULARITY, name);
+ sprintf (buf, "bug, please report (%s)", name);
object *op = get_archetype ("bug");
op->name = op->name_pl = buf;