mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 16:05:19 +00:00
Revert "Game Display: make first_turn a static local to the only function that uses it"
This reverts commit cc7204f66ec3efe5dd04333c30782ac7dfdf918d.
This commit is contained in:
parent
b5ea773827
commit
34df9d6ca8
@ -77,6 +77,7 @@ game_display::game_display(game_board& board,
|
|||||||
, attack_indicator_dst_()
|
, attack_indicator_dst_()
|
||||||
, route_()
|
, route_()
|
||||||
, displayedUnitHex_()
|
, displayedUnitHex_()
|
||||||
|
, first_turn_(true)
|
||||||
, in_game_(false)
|
, in_game_(false)
|
||||||
, chat_man_(new display_chat_manager(*this))
|
, chat_man_(new display_chat_manager(*this))
|
||||||
, mode_(RUNNING)
|
, mode_(RUNNING)
|
||||||
@ -95,10 +96,7 @@ game_display::~game_display()
|
|||||||
|
|
||||||
void game_display::new_turn()
|
void game_display::new_turn()
|
||||||
{
|
{
|
||||||
static bool first_turn = true;
|
if(!first_turn_) {
|
||||||
|
|
||||||
// We want to skip this on the first run of this function
|
|
||||||
if(!first_turn) {
|
|
||||||
const time_of_day& tod = resources::tod_manager->get_time_of_day();
|
const time_of_day& tod = resources::tod_manager->get_time_of_day();
|
||||||
const time_of_day& old_tod = resources::tod_manager->get_previous_time_of_day();
|
const time_of_day& old_tod = resources::tod_manager->get_previous_time_of_day();
|
||||||
|
|
||||||
@ -107,7 +105,7 @@ void game_display::new_turn()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
first_turn = false;
|
first_turn_ = false;
|
||||||
|
|
||||||
update_tod();
|
update_tod();
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ private:
|
|||||||
|
|
||||||
map_location displayedUnitHex_;
|
map_location displayedUnitHex_;
|
||||||
|
|
||||||
bool in_game_;
|
bool first_turn_, in_game_;
|
||||||
|
|
||||||
const std::unique_ptr<display_chat_manager> chat_man_;
|
const std::unique_ptr<display_chat_manager> chat_man_;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user