Remove the input delay setting and players being away
Neither does anything with the server running the games. Counting down to play again moves into the match, so the server and every player agree on it and the results show it starting again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3b65cb575f
commit
56af1c357c
8 files changed
+30
-51
No files matched your search
+4
-10
@@ -54,8 +54,7 @@ struct Frame
|
||||
};
|
||||
|
||||
// One online game: a lobby's sandbox or a game queued in it. Inputs holds each member's controls by tick as they come
|
||||
// (until played), and held what each played last, repeated when the next are late. Again counts the ticks a finished
|
||||
// game's players have all been set to play again.
|
||||
// (until played), and held what each played last, repeated when the next are late.
|
||||
struct Room
|
||||
{
|
||||
Sim sim;
|
||||
@@ -64,7 +63,6 @@ struct Room
|
||||
std::map<int, Controls> held;
|
||||
Frame frames[FRAME_RING];
|
||||
std::string code;
|
||||
int again = 0;
|
||||
int tick = 0;
|
||||
};
|
||||
|
||||
@@ -565,8 +563,8 @@ static void game_open(int sandboxSerial, int queuer)
|
||||
}
|
||||
|
||||
// After a game's tick: anyone who's left it goes back to the sandbox, and once a finished match's players have all
|
||||
// been set to play again for a moment, they go on to a fresh game in a room of its own. A game no one plays in any more
|
||||
// is over.
|
||||
// been set to play again for a moment (see Match::againTicks), they go on to a fresh game in a room of its own. A game
|
||||
// no one plays in any more is over.
|
||||
static void game_follow(int serial)
|
||||
{
|
||||
Room& game = rooms[serial];
|
||||
@@ -574,7 +572,6 @@ static void game_follow(int serial)
|
||||
int sandbox = lobbies[game.code].rooms.front();
|
||||
int seats[MAX_FIGHTERS];
|
||||
int humans = 0;
|
||||
bool isAgain = match.state == MATCH_OVER;
|
||||
for (int k = 0; k < game.sim.fighterCount; k++)
|
||||
{
|
||||
int owner = match.owners[k];
|
||||
@@ -587,12 +584,9 @@ static void game_follow(int serial)
|
||||
room_enter(owner, sandbox, true);
|
||||
continue;
|
||||
}
|
||||
isAgain &= match.isReady[k];
|
||||
seats[humans++] = k;
|
||||
}
|
||||
bool isSet = isAgain && (humans >= PLAYERS_MIN || match.rules.isBotFill);
|
||||
game.again = isSet ? game.again + 1 : 0;
|
||||
if (humans > 0 && game.again < QUEUE_START_TICKS)
|
||||
if (humans > 0 && match.againTicks < QUEUE_START_TICKS)
|
||||
return;
|
||||
if (humans > 0)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user