small function reorder
This commit is contained in:
parent
102ba5801e
commit
0b1cc36e51
1 changed files with 21 additions and 21 deletions
|
@ -430,6 +430,27 @@ void playmp_controller::play_slice(bool is_delay_enabled)
|
|||
playsingle_controller::play_slice(is_delay_enabled);
|
||||
}
|
||||
|
||||
bool playmp_controller::is_networked_mp() const
|
||||
{
|
||||
return mp_info_ != nullptr;
|
||||
}
|
||||
|
||||
void playmp_controller::send_to_wesnothd(const config& cfg, const std::string&) const
|
||||
{
|
||||
if(mp_info_ != nullptr) {
|
||||
mp_info_->connection.send_data(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
bool playmp_controller::receive_from_wesnothd(config& cfg) const
|
||||
{
|
||||
if(mp_info_ != nullptr) {
|
||||
return mp_info_->connection.receive_data(cfg);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void playmp_controller::process_network_data(bool chat_only)
|
||||
{
|
||||
if(gamestate().in_phase(game_data::TURN_ENDED) || is_regular_game_end() || player_type_changed_) {
|
||||
|
@ -455,24 +476,3 @@ void playmp_controller::process_network_data(bool chat_only)
|
|||
replay::process_error("Received unexpected next_scenario during the game");
|
||||
}
|
||||
}
|
||||
|
||||
bool playmp_controller::is_networked_mp() const
|
||||
{
|
||||
return mp_info_ != nullptr;
|
||||
}
|
||||
|
||||
void playmp_controller::send_to_wesnothd(const config& cfg, const std::string&) const
|
||||
{
|
||||
if(mp_info_ != nullptr) {
|
||||
mp_info_->connection.send_data(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
bool playmp_controller::receive_from_wesnothd(config& cfg) const
|
||||
{
|
||||
if(mp_info_ != nullptr) {
|
||||
return mp_info_->connection.receive_data(cfg);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue