]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/switches.cpp
Added .gitignore to ignore certain files + fixed access rights on Makefile* as
[quix0rs-blobwars.git] / src / switches.cpp
index d698822a17e5d44bfd1e7533a61f997bbeee294b..2545f8b240d18fbdf7fb5ba3ebba498e5ace61cb 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004-2010 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -84,7 +85,7 @@ void checkSwitchContact(Entity *ent)
                                {
                                        if ((swt->type == SWT_NORMAL) || (swt->type == SWT_WATERLEVEL))
                                        {
-                                               audio.playSound(SND_SWITCH1, CH_TOUCH);
+                                               audio.playSound(SND_SWITCH1, CH_TOUCH, swt->x);
                                                swt->activated = !swt->activated;
                                                activateTrigger(swt->linkName, swt->activateMessage, swt->activated);
                                                swt->health = 1;
@@ -92,20 +93,20 @@ void checkSwitchContact(Entity *ent)
                                        }
                                        else if (swt->type == SWT_TOGGLE)
                                        {
-                                               audio.playSound(SND_SWITCH1, CH_TOUCH);
+                                               audio.playSound(SND_SWITCH1, CH_TOUCH, swt->x);
                                                activateTrigger(swt->linkName, swt->activateMessage, !swt->activated);
                                                swt->activated = !swt->activated;
                                        }
                                        else if (swt->type == SWT_PRESSURE)
                                        {
-                                               audio.playSound(SND_SWITCH1, CH_TOUCH);
+                                               audio.playSound(SND_SWITCH1, CH_TOUCH, swt->x);
                                                swt->activated = true;
                                                activateTrigger(swt->linkName, swt->activateMessage, true);
                                                swt->health = 2;
                                        }
                                        else if ((swt->type == SWT_TIMED) || (swt->type == SWT_RESET))
                                        {
-                                               audio.playSound(SND_SWITCH1, CH_TOUCH);
+                                               audio.playSound(SND_SWITCH1, CH_TOUCH, swt->x);
                                                activateTrigger(swt->linkName, swt->activateMessage, true);
                                                swt->activated = !swt->activated;
                                                swt->health = 240;