bindings bug fix
If binding was blocked in one world, it stayed being blocked in other.
This commit is contained in:
@@ -60,6 +60,8 @@ static int l_close_world(lua::State* L) {
|
|||||||
if (save_world) {
|
if (save_world) {
|
||||||
controller->saveWorld();
|
controller->saveWorld();
|
||||||
}
|
}
|
||||||
|
// unblock all bindings
|
||||||
|
Events::enableBindings();
|
||||||
// destroy LevelScreen and run quit callbacks
|
// destroy LevelScreen and run quit callbacks
|
||||||
engine->setScreen(nullptr);
|
engine->setScreen(nullptr);
|
||||||
// create and go to menu screen
|
// create and go to menu screen
|
||||||
|
|||||||
@@ -231,3 +231,10 @@ void Events::loadBindings(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Events::enableBindings() {
|
||||||
|
for (auto& entry : bindings) {
|
||||||
|
auto& binding = entry.second;
|
||||||
|
binding.enable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -60,4 +60,5 @@ public:
|
|||||||
const std::string& filename, const std::string& source,
|
const std::string& filename, const std::string& source,
|
||||||
BindType bindType
|
BindType bindType
|
||||||
);
|
);
|
||||||
|
static void enableBindings();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user