--- deliantra/server/common/button.C 2009/10/12 21:27:54 1.57 +++ deliantra/server/common/button.C 2009/11/07 18:30:05 1.62 @@ -1,7 +1,7 @@ /* * 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 * @@ -86,8 +86,13 @@ case SIGN: if (!tmp->stats.food || tmp->last_eat < tmp->stats.food) { - tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_sign")); - new_info_map (NDI_UNIQUE | NDI_NAVY, tmp->map, tmp->msg); + tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("msg_voice")); + + if (originator && originator->contr) + originator->contr->infobox (MSG_CHANNEL ("examine"), format ("T<%s>\n\n%s", &tmp->name, &tmp->msg)); + + new_info_map_except (NDI_UNIQUE | NDI_NAVY, tmp->map, originator, tmp->msg); + if (tmp->stats.food) tmp->last_eat++; } @@ -273,6 +278,25 @@ any_down = any_down || tmp->value; } + else if (tmp->type == T_MATCH) + { + tmp->value = 0; + + for (object *ab = tmp->above; ab; ab = ab->above) + { + 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)) + if (match (tmp->slaying, head, tmp, originator)) + { + tmp->value = 1; + break; + } + } + + any_down = any_down || tmp->value; + } } if (any_down) /* If any other buttons were down, force this to remain down */ @@ -402,7 +426,7 @@ return 1; } -void +static void trigger_move (object *op, int state, object *originator) /* 1 down and 0 up */ { op->stats.wc = state; @@ -438,7 +462,7 @@ { object *tmp; int push = 0, tot = 0; - int in_movement = op->stats.wc || op->speed; + int in_movement = op->stats.wc || op->has_active_speed (); switch (op->type) {