diff --git a/plugins/reveal.cpp b/plugins/reveal.cpp index 3aba37b95..8d76bd54b 100644 --- a/plugins/reveal.cpp +++ b/plugins/reveal.cpp @@ -62,7 +62,6 @@ struct hideblock uint32_t x_max, y_max, z_max; vector hidesaved; bool nopause_state = false; -Pausing::PlayerLock* pause_lock = nullptr; enum revealstate { @@ -107,7 +106,6 @@ DFhackCExport command_result plugin_init ( color_ostream &out, vector & parameters) { if (parameters.size() == 1 && (parameters[0] == "0" || parameters[0] == "1")) { - if (parameters[0] == "0") { - if (nopause_state) { - pause_lock->unlock(); - if (!World::EnablePlayerPausing()) { - out.printerr("reveal/nopause: Player pausing is currently locked by another plugin / script. Unable to re-enable.\n"); - } - } + if (parameters[0] == "0") nopause_state = 0; - } else { - if (!nopause_state) { - pause_lock->unlock(); - if (!World::DisablePlayerPausing()) { - out.printerr("reveal/nopause: Player pausing is currently locked by another plugin / script. Unable to disable.\n"); - } - } + else nopause_state = 1; - } is_active = nopause_state || (revealed == REVEALED); out.print("nopause %sactivated.\n", (nopause_state ? "" : "de")); } @@ -490,7 +474,7 @@ command_result revflood(color_ostream &out, vector & params) return CR_WRONG_USAGE; } CoreSuspender suspend; - uint32_t xmax,ymax,zmax; + uint32_t x_max,y_max,z_max; if (!Maps::IsValid()) { out.printerr("Map is not available!\n"); @@ -509,7 +493,7 @@ command_result revflood(color_ostream &out, vector & params) return CR_FAILURE; } int32_t cx, cy, cz; - Maps::getSize(xmax, ymax, zmax); + Maps::getSize(x_max,y_max,z_max); Gui::getCursorCoords(cx,cy,cz); if(cx == -30000) @@ -527,7 +511,7 @@ command_result revflood(color_ostream &out, vector & params) return CR_FAILURE; } // hide all tiles, flush cache - Maps::getSize(xmax, ymax, zmax); + Maps::getSize(x_max,y_max,z_max); for(size_t i = 0; i < world->map.map_blocks.size(); i++) {