X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftrigger%2Fswitch.cpp;h=b32e5eded69147e0b6636eb54a2b36af151c29ab;hb=3d0fc88a41d3774bbbcaee76efdb996bbacc6c45;hp=82b97e13fb8eb9066d6034c8a7d6544a53339b6c;hpb=65a0b6f7ec1123cff959e13e1a4919dc70fe4e85;p=supertux.git diff --git a/src/trigger/switch.cpp b/src/trigger/switch.cpp index 82b97e13f..b32e5eded 100644 --- a/src/trigger/switch.cpp +++ b/src/trigger/switch.cpp @@ -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;