bug fixes to server

This commit is contained in:
Dave White 2003-10-19 12:33:46 +00:00
parent 8455f4ad3d
commit 9d6f1e14b7

View file

@ -190,6 +190,8 @@ int main()
//record the new level data, and send to all players
//who are in the game
g->level() = data;
g->send_data(data,sock);
continue;
}
const string_map::const_iterator side =
@ -198,6 +200,7 @@ int main()
const bool res = g->take_side(sock,side->second);
config response;
if(res) {
std::cerr << "played joined side\n";
response["side_secured"] = side->second;
} else {
response["failed"] = "yes";
@ -211,6 +214,13 @@ int main()
g->start_game();
}
if(data["side_secured"].empty() == false) {
continue;
} else if(data["failed"].empty() == false) {
std::cerr << "ERROR: failure to get side\n";
continue;
}
//forward data to all players who are in the game,
//except for the original data sender
g->send_data(data,sock);