--- deliantra/server/common/button.C 2007/07/31 18:28:46 1.38
+++ deliantra/server/common/button.C 2007/11/08 19:43:23 1.40
@@ -1,11 +1,11 @@
/*
- * This file is part of Crossfire TRT, the Roguelike Realtime MORPG.
+ * This file is part of Deliantra, the Roguelike Realtime MMORPG.
*
- * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team
+ * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra 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
+ * 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.
@@ -18,7 +18,7 @@
* 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
+ * The authors can be reached via e-mail to
*/
#include
@@ -69,6 +69,10 @@
{
case GATE:
case HOLE:
+ if (!tmp->active)
+ tmp->play_sound (tmp->sound
+ ? tmp->sound
+ : sound_find (tmp->type == GATE ? "trigger_gate" : "trigger_hole"));
tmp->value = tmp->stats.maxsp ? !state : state;
tmp->set_speed (0.5);
break;
@@ -81,7 +85,7 @@
case SIGN:
if (!tmp->stats.food || tmp->last_eat < tmp->stats.food)
{
- tmp->play_sound (tmp->sound);
+ tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_sign"));
new_info_map (NDI_UNIQUE | NDI_NAVY, tmp->map, tmp->msg);
if (tmp->stats.food)
tmp->last_eat++;
@@ -89,6 +93,7 @@
break;
case ALTAR:
+ tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_altar"));
tmp->value = 1;
SET_ANIMATION (tmp, tmp->value);
update_object (tmp, UP_OBJ_FACE);
@@ -96,6 +101,7 @@
case BUTTON:
case PEDESTAL:
+ tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_button"));
tmp->value = state;
SET_ANIMATION (tmp, tmp->value);
update_object (tmp, UP_OBJ_FACE);
@@ -106,6 +112,8 @@
break;
case TIMED_GATE:
+ if (!tmp->active)
+ tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_gate"));
tmp->set_speed (tmp->arch->speed);
tmp->value = tmp->arch->value;
tmp->stats.sp = 1;
@@ -144,6 +152,7 @@
break;
case TRIGGER_MARKER:
+ //tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_marker"));
move_marker (tmp);
break;