Don't build unit map when in linger mode or when we're an observer.

Fixes bug #19221.
This commit is contained in:
Gabriel Morin 2012-01-17 03:35:15 +00:00
parent 0adcdd6120
commit 9489f4d43a

View file

@ -1117,8 +1117,8 @@ void manager::options_dlg()
void manager::set_planned_unit_map()
{
if (wait_for_side_init_) {
LOG_WB << "Not building planned unit map: waiting for side init.\n";
if (!can_modify_game_state()) {
LOG_WB << "Not building planned unit map: cannot modify game state now.\n";
return;
}
//any more than one reference means a lock on unit map was requested
@ -1126,10 +1126,6 @@ void manager::set_planned_unit_map()
LOG_WB << "Not building planned unit map: unit map locked.\n";
return;
}
if (executing_actions_) {
LOG_WB << "Not building planned unit map: action is executing.\n";
return;
}
if (planned_unit_map_active_) {
WRN_WB << "Not building planned unit map: already set.\n";
return;