remove unused argument
This commit is contained in:
parent
6ce4e441a2
commit
22d17ba4dd
3 changed files with 8 additions and 14 deletions
|
@ -194,7 +194,7 @@ void playmp_controller::play_human_turn(){
|
|||
std::deque<config> backlog;
|
||||
|
||||
if(res != network::null_connection) {
|
||||
if (turn_data_->process_network_data(cfg, res, backlog, skip_replay_) == turn_info::PROCESS_RESTART_TURN)
|
||||
if (turn_data_->process_network_data(cfg, backlog, skip_replay_) == turn_info::PROCESS_RESTART_TURN)
|
||||
{
|
||||
// Clean undo stack if turn has to be restarted (losing control)
|
||||
if ( undo_stack_->can_undo() )
|
||||
|
@ -408,7 +408,7 @@ void playmp_controller::wait_for_upload()
|
|||
|
||||
std::deque<config> backlog;
|
||||
if(res != network::null_connection) {
|
||||
if (turn_data_->process_network_data(cfg, res, backlog, skip_replay_)
|
||||
if (turn_data_->process_network_data(cfg, backlog, skip_replay_)
|
||||
== turn_info::PROCESS_END_LINGER) {
|
||||
break;
|
||||
}
|
||||
|
@ -478,15 +478,12 @@ void playmp_controller::play_network_turn(){
|
|||
bool have_data = false;
|
||||
config cfg;
|
||||
|
||||
network::connection from = network::null_connection;
|
||||
|
||||
if(data_backlog_.empty() == false) {
|
||||
have_data = true;
|
||||
cfg = data_backlog_.front();
|
||||
data_backlog_.pop_front();
|
||||
} else {
|
||||
from = network::receive_data(cfg);
|
||||
have_data = from != network::null_connection;
|
||||
have_data = network::receive_data(cfg) != network::null_connection;
|
||||
}
|
||||
|
||||
if(have_data) {
|
||||
|
@ -495,7 +492,7 @@ void playmp_controller::play_network_turn(){
|
|||
skip_replay_ = false;
|
||||
}
|
||||
}
|
||||
const turn_info::PROCESS_DATA_RESULT result = turn_data.process_network_data(cfg, from, data_backlog_, skip_replay_);
|
||||
const turn_info::PROCESS_DATA_RESULT result = turn_data.process_network_data(cfg, data_backlog_, skip_replay_);
|
||||
if(player_type_changed_ == true)
|
||||
{
|
||||
//we received a player change/quit during waiting in get_user_choice/synced_context::pull_remote_user_input
|
||||
|
|
|
@ -64,10 +64,9 @@ turn_info::PROCESS_DATA_RESULT turn_info::sync_network()
|
|||
//the AI's turn, we don't want there to be any chance where we
|
||||
//could get data back pertaining to the next turn.
|
||||
config cfg;
|
||||
network::connection res = network::null_connection;
|
||||
while( (retv == turn_info::PROCESS_CONTINUE) && (res = network::receive_data(cfg))) {
|
||||
while( (retv == turn_info::PROCESS_CONTINUE) && (network::receive_data(cfg) != network::null_connection)) {
|
||||
std::deque<config> backlog;
|
||||
retv = process_network_data(cfg,res,backlog,false);
|
||||
retv = process_network_data(cfg,backlog,false);
|
||||
cfg.clear();
|
||||
}
|
||||
|
||||
|
@ -123,7 +122,7 @@ void turn_info::do_save()
|
|||
}
|
||||
|
||||
turn_info::PROCESS_DATA_RESULT turn_info::process_network_data(const config& cfg,
|
||||
network::connection /*from*/, std::deque<config>& backlog, bool skip_replay)
|
||||
std::deque<config>& backlog, bool skip_replay)
|
||||
{
|
||||
// we cannot be connected to multiple peers anymore because
|
||||
// the simple wesnothserver implementation in wesnoth was removed years ago.
|
||||
|
|
|
@ -48,9 +48,7 @@ public:
|
|||
//No more than one turn's worth of data will be placed into a single backlog item,
|
||||
//so it is safe to assume that backlog won't be touched if cfg is a member of a previous
|
||||
//backlog.
|
||||
//data will be forwarded to all peers other than 'from', unless 'from' is null, in
|
||||
//which case data will not be forwarded
|
||||
PROCESS_DATA_RESULT process_network_data(const config& cfg,network::connection from,std::deque<config>& backlog, bool skip_replay);
|
||||
PROCESS_DATA_RESULT process_network_data(const config& cfg,std::deque<config>& backlog, bool skip_replay);
|
||||
|
||||
events::generic_event& host_transfer() { return host_transfer_; }
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue