diff options
Diffstat (limited to 'src/input_system.cpp')
-rw-r--r-- | src/input_system.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_system.cpp b/src/input_system.cpp index 6ee442a..2201907 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp | |||
@@ -54,7 +54,7 @@ void InputSystem::tick(double dt) { | |||
54 | 54 | ||
55 | Sprite& collider = game_.getSprite(collision.horiz.colliderSprite); | 55 | Sprite& collider = game_.getSprite(collision.horiz.colliderSprite); |
56 | if (collider.interactionScript != "") { | 56 | if (collider.interactionScript != "") { |
57 | game_.getSystem<ScriptSystem>().runScript(collider.interactionScript); | 57 | game_.getSystem<ScriptSystem>().runScript(game_.getMap().getName(), collider.interactionScript); |
58 | activated = true; | 58 | activated = true; |
59 | } | 59 | } |
60 | } else if (collision.vert.colliderSprite != -1) { | 60 | } else if (collision.vert.colliderSprite != -1) { |
@@ -62,7 +62,7 @@ void InputSystem::tick(double dt) { | |||
62 | 62 | ||
63 | Sprite& collider = game_.getSprite(collision.vert.colliderSprite); | 63 | Sprite& collider = game_.getSprite(collision.vert.colliderSprite); |
64 | if (collider.interactionScript != "") { | 64 | if (collider.interactionScript != "") { |
65 | game_.getSystem<ScriptSystem>().runScript(collider.interactionScript); | 65 | game_.getSystem<ScriptSystem>().runScript(game_.getMap().getName(), collider.interactionScript); |
66 | activated = true; | 66 | activated = true; |
67 | } | 67 | } |
68 | } | 68 | } |
@@ -70,7 +70,7 @@ void InputSystem::tick(double dt) { | |||
70 | } | 70 | } |
71 | 71 | ||
72 | if (inFrontOfSomething && !activated) { | 72 | if (inFrontOfSomething && !activated) { |
73 | game_.getSystem<ScriptSystem>().runScript("default"); | 73 | game_.getSystem<ScriptSystem>().runScript("global", "no_problem_here"); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | } else if (e.key.keysym.sym == SDLK_LEFT) { | 76 | } else if (e.key.keysym.sym == SDLK_LEFT) { |