aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/game.cpp b/src/game.cpp
index b751a2b62..aef60484f 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -813,7 +813,7 @@ public:
services->setVertexShaderConstant("animationTimer", &animation_timer_f, 1);
LocalPlayer* player = m_client->getEnv().getLocalPlayer();
- v3f eye_position = player->getEyePosition();
+ v3f eye_position = player->getEyePosition();
services->setPixelShaderConstant("eyePosition", (irr::f32*)&eye_position, 3);
services->setVertexShaderConstant("eyePosition", (irr::f32*)&eye_position, 3);
@@ -1876,12 +1876,12 @@ void the_game(
}
else if(input->wasKeyDown(getKeySetting("keymap_screenshot")))
{
- irr::video::IImage* const image = driver->createScreenShot();
- if (image) {
- irr::c8 filename[256];
- snprintf(filename, 256, "%s" DIR_DELIM "screenshot_%u.png",
+ irr::video::IImage* const image = driver->createScreenShot();
+ if (image) {
+ irr::c8 filename[256];
+ snprintf(filename, 256, "%s" DIR_DELIM "screenshot_%u.png",
g_settings->get("screenshot_path").c_str(),
- device->getTimer()->getRealTime());
+ device->getTimer()->getRealTime());
if (driver->writeImageToFile(image, filename)) {
std::wstringstream sstr;
sstr<<"Saved screenshot to '"<<filename<<"'";
@@ -1891,8 +1891,8 @@ void the_game(
} else{
infostream<<"Failed to save screenshot '"<<filename<<"'"<<std::endl;
}
- image->drop();
- }
+ image->drop();
+ }
}
else if(input->wasKeyDown(getKeySetting("keymap_toggle_hud")))
{
@@ -2263,7 +2263,7 @@ void the_game(
new MainRespawnInitiator(
&respawn_menu_active, &client);
GUIDeathScreen *menu =
- new GUIDeathScreen(guienv, guiroot, -1,
+ new GUIDeathScreen(guienv, guiroot, -1,
&g_menumgr, respawner);
menu->drop();
@@ -2755,7 +2755,7 @@ void the_game(
// Sign special case, at least until formspec is properly implemented.
// Deprecated?
- if(meta && meta->getString("formspec") == "hack:sign_text_input"
+ if(meta && meta->getString("formspec") == "hack:sign_text_input"
&& !random_input
&& !input->isKeyDown(getKeySetting("keymap_sneak")))
{
@@ -3222,7 +3222,7 @@ void the_game(
driver->getOverrideMaterial().Material.ColorMask = irr::video::ECP_RED;
driver->getOverrideMaterial().EnableFlags = irr::video::EMF_COLOR_MASK;
- driver->getOverrideMaterial().EnablePasses = irr::scene::ESNRP_SKY_BOX +
+ driver->getOverrideMaterial().EnablePasses = irr::scene::ESNRP_SKY_BOX +
irr::scene::ESNRP_SOLID +
irr::scene::ESNRP_TRANSPARENT +
irr::scene::ESNRP_TRANSPARENT_EFFECT +
@@ -3433,6 +3433,16 @@ void the_game(
chat_backend.addMessage(L"", L"# Disconnected.");
chat_backend.addMessage(L"", L"");
+ client.Stop();
+
+ //force answer all texture and shader jobs (TODO return empty values)
+
+ while(!client.isShutdown()) {
+ tsrc->processQueue();
+ shsrc->processQueue();
+ sleep_ms(100);
+ }
+
// Client scope (client is destructed before destructing *def and tsrc)
}while(0);
} // try-catch