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 multiple 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 157 of file synced_user_choice.cpp.
References resources::controller, play_controller::current_side(), DBG_REPLAY, ERR_REPLAY, resources::gameboard, resources::gamedata, game_board::get_team(), user_choice_manager::get_user_choice_internal(), game_data::is_before_screen(), team::is_empty(), play_controller::is_networked_mp(), synced_context::is_synced(), mp_sync::user_choice::is_visible(), LOG_REPLAY, mp_sync::user_choice::query_user(), mp_sync::user_choice::random_choice(), and game_board::teams().
Referenced by 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 multiple sides for WML events.
uch is called on all sides specified in sides, this in done simultaneously on all those sides (or one after another if one client controls multiple sides) and after all calls are executed the results are returned.
Definition at line 103 of file synced_user_choice.cpp.
References resources::gameboard, user_choice_manager::get_user_choice_internal(), synced_context::is_synced(), replay::process_error(), mp_sync::user_choice::random_choice(), and game_board::teams().
Referenced by intf_synchronize_choices().