mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 10:09:05 +00:00
Stopped the Join button in the lobby from always being disabled.
The problem was that the server was sending the open game slots as a string of the form "#/#", which lobby_data.cpp then tried to convert to an int with: game["slots"].to_int()). The result of that was obviously always zero. I made the "slots" string to be written as only the number of open slots, instead of using the form 'X slots'/'Y total'. Change it if you like, but now everything seems to work as intended.
This commit is contained in:
parent
2beda7d0f1
commit
cf8a22fd2b
@ -511,7 +511,7 @@ bool game::describe_slots() {
|
||||
}
|
||||
}
|
||||
char buf[50];
|
||||
snprintf(buf,sizeof(buf), "%d/%d", available_slots, num_sides);
|
||||
snprintf(buf,sizeof(buf), "%d", available_slots);
|
||||
|
||||
if ((*description_)["slots"] != buf) {
|
||||
description_->set_attr_dup("slots", buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user