* Update squirrel to 2.2.3
[supertux.git] / src / trigger / switch.cpp
index 82b97e1..b32e5ed 100644 (file)
@@ -69,7 +69,9 @@ Switch::update(float )
     case TURN_ON:
       if(sprite->animation_done()) {
     std::istringstream stream(script);
-    Sector::current()->run_script(stream, "Switch");
+    std::ostringstream location;
+    location << "switch" << bbox.p1;
+    Sector::current()->run_script(stream, location.str());
 
     sprite->set_action("on", 1);
     state = ON;