Bugfix: don't do multiple loads simultaneously.

This commit is contained in:
2018-04-16 17:54:47 +02:00
parent 51b537676d
commit 08c805377e

View File

@@ -93,6 +93,10 @@ void RenderingState::move(unsigned char key, bool sprint)
void RenderingState::handleKey(unsigned char x) void RenderingState::handleKey(unsigned char x)
{ {
if (isLoading()) {
// Don't handle user input while loading.
return;
}
switch (x) { switch (x) {
case 'w': case 'w':
case 'a': case 'a':
@@ -365,6 +369,10 @@ void RenderingState::renderLayerName(const std::string &name) const
void RenderingState::handleSpecialKey(int key) void RenderingState::handleSpecialKey(int key)
{ {
if (isLoading()) {
// Don't handle user input while loading.
return;
}
switch (key) { switch (key) {
case GLUT_KEY_LEFT: case GLUT_KEY_LEFT:
if (currentData == layerData.begin()) { if (currentData == layerData.begin()) {