--- deliantra/server/common/button.C 2009/10/11 18:18:03 1.54
+++ deliantra/server/common/button.C 2009/10/15 21:40:42 1.58
@@ -1,22 +1,23 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
*
- * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
+ * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
* Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
* Copyright (©) 1992,2007 Frank Tore Johansen
*
- * 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
*/
@@ -77,7 +78,7 @@
tmp->set_speed (0.5);
break;
- case CF_HANDLE:
+ case T_HANDLE:
SET_ANIMATION (tmp, (tmp->value = tmp->stats.maxsp ? !state : state));
update_object (tmp, UP_OBJ_FACE);
break;
@@ -250,6 +251,7 @@
}
else if (tmp->type == PEDESTAL)
{
+ bool is_match = is_match_expr (tmp->slaying);
tmp->value = 0;
for (object *ab = tmp->above; ab; ab = ab->above)
@@ -257,11 +259,16 @@
object *head = ab->head_ ();
/* Same note regarding move_type for buttons above apply here. */
- if (((ab->move_type & tmp->move_on) || ab->move_type == 0)
- && (head->race == tmp->slaying
- || (head->type == SPECIAL_KEY && head->slaying == tmp->slaying)
- || (tmp->slaying == shstr_player && head->type == PLAYER)))
- tmp->value = 1;
+ if (((ab->move_type & tmp->move_on) || ab->move_type == 0))
+ if (is_match
+ ? match (tmp->slaying, head, tmp, originator)
+ : (head->race == tmp->slaying
+ || (head->type == SPECIAL_KEY && head->slaying == tmp->slaying)
+ || (tmp->slaying == shstr_player && head->type == PLAYER)))
+ {
+ tmp->value = 1;
+ break;
+ }
}
any_down = any_down || tmp->value;