Classes | |
struct | user_choice |
Interface for querying local choices. More... | |
Functions | |||||
replay commands as legal from | |||||
Performs a choice for WML events. The choice is synchronized across all the multiplayer clients and stored into the replay. The function object is called if the local client is responsible for making the choice. otherwise this function waits for a remote choice and returns it when it is received. information about the choice made is saved in replay with dependent=true
| |||||
config | get_user_choice (const std::string &name, const user_choice &uch, int side=0) | ||||
std::map< int, config > | get_user_choice_multiple_sides (const std::string &name, const user_choice &uch, std::set< int > sides) | ||||
Performs a choice for mutiple sides for WML events. More... | |||||
config mp_sync::get_user_choice | ( | const std::string & | name, |
const user_choice & | uch, | ||
int | side = 0 |
||
) |
Definition at line 148 of file synced_user_choice.cpp.
References resources::controller, play_controller::current_side(), DBG_REPLAY, ERR_REPLAY, resources::gamedata, user_choice_manager::get_user_choice_internal(), play_controller::is_networked_mp(), synced_context::is_synced(), mp_sync::user_choice::is_visible(), LOG_REPLAY, game_data::phase(), game_data::PLAY, mp_sync::user_choice::query_user(), mp_sync::user_choice::random_choice(), game_data::START, and resources::teams.
Referenced by advance_unit_at(), get_global_variable(), intf_synchronize_choice(), mp_debug_checkup::local_checkup(), and game_events::WML_HANDLER_FUNCTION().
std::map< int, config > mp_sync::get_user_choice_multiple_sides | ( | const std::string & | name, |
const user_choice & | uch, | ||
std::set< int > | sides | ||
) |
Performs a choice for mutiple sides for WML events.
uch is called on all sies specified in sides, this in done simulaniously on all those sides (or one after another if one client controlls mutiple sides) and after all calls are executed the results are returned.
Definition at line 102 of file synced_user_choice.cpp.
References user_choice_manager::get_user_choice_internal(), synced_context::is_synced(), replay::process_error(), mp_sync::user_choice::random_choice(), and resources::teams.
Referenced by intf_synchronize_choices().