mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 06:18:36 +00:00
simplyfy conditional structure
This commit is contained in:
parent
54e27d2d3f
commit
ea2386a8a7
@ -251,10 +251,9 @@ void connect_engine::import_user(const config& data, const bool observer,
|
||||
}
|
||||
}
|
||||
|
||||
if (side_taken < 0) {
|
||||
// If no sides were assigned for a user,
|
||||
// take a first available side.
|
||||
if (!side_assigned) {
|
||||
if (side_taken < 0 && !side_assigned) {
|
||||
BOOST_FOREACH(side_engine_ptr side, side_engines_) {
|
||||
if (side->available_for_user(username) ||
|
||||
side->controller() == CNTR_LOCAL) {
|
||||
@ -265,7 +264,6 @@ void connect_engine::import_user(const config& data, const bool observer,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if user has taken any sides, which should get control
|
||||
// over any other sides.
|
||||
|
Loading…
x
Reference in New Issue
Block a user