[iortcw] 57/152: All: Fix for client not receiving gamestate after a download completes
Simon McVittie
smcv at debian.org
Fri Sep 8 10:39:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.5a
in repository iortcw.
commit ff963c73eb001570bb6ee621a7fe013aaac2ad69
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Thu May 12 21:27:32 2016 -0400
All: Fix for client not receiving gamestate after a download completes
---
MP/code/server/sv_client.c | 10 +++++++---
SP/code/server/sv_client.c | 19 ++++++++++++++-----
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/MP/code/server/sv_client.c b/MP/code/server/sv_client.c
index 5cf1f7d..74684b5 100644
--- a/MP/code/server/sv_client.c
+++ b/MP/code/server/sv_client.c
@@ -2055,9 +2055,13 @@ void SV_ExecuteClientMessage( client_t *cl, msg_t *msg ) {
// I don't like this hack though, it must have been working fine at some point, suspecting the fix is somewhere else
if ( serverId != sv.serverId && !*cl->downloadName && !strstr( cl->lastClientCommandString, "nextdl" ) ) {
if ( serverId >= sv.restartedServerId && serverId < sv.serverId ) { // TTimo - use a comparison here to catch multiple map_restart
- // they just haven't caught the map_restart yet
- Com_DPrintf( "%s : ignoring pre map_restart / outdated client message\n", cl->name );
- return;
+ if ( strstr( cl->lastClientCommandString, "donedl" ) ) {
+ SV_DoneDownload_f( cl );
+ } else {
+ // they just haven't caught the map_restart yet
+ Com_DPrintf( "%s : ignoring pre map_restart / outdated client message\n", cl->name );
+ return;
+ }
}
// if we can tell that the client has dropped the last
// gamestate we sent them, resend it
diff --git a/SP/code/server/sv_client.c b/SP/code/server/sv_client.c
index b1ab870..39e7425 100644
--- a/SP/code/server/sv_client.c
+++ b/SP/code/server/sv_client.c
@@ -1884,11 +1884,20 @@ void SV_ExecuteClientMessage( client_t *cl, msg_t *msg ) {
// gamestate it was at. This allows it to keep downloading even when
// the gamestate changes. After the download is finished, we'll
// notice and send it a new game state
- if ( serverId != sv.serverId &&
- !*cl->downloadName ) {
- if ( serverId == sv.restartedServerId ) {
- // they just haven't caught the map_restart yet
- return;
+ //
+ // show_bug.cgi?id=536
+ // don't drop as long as previous command was a nextdl, after a dl is done, downloadName is set back to ""
+ // but we still need to read the next message to move to next download or send gamestate
+ // I don't like this hack though, it must have been working fine at some point, suspecting the fix is somewhere else
+ if ( serverId != sv.serverId && !*cl->downloadName && !strstr( cl->lastClientCommandString, "nextdl" ) ) {
+ if ( serverId >= sv.restartedServerId && serverId < sv.serverId ) { // TTimo - use a comparison here to catch multiple map_restart
+ if ( strstr( cl->lastClientCommandString, "donedl" ) ) {
+ SV_DoneDownload_f( cl );
+ } else {
+ // they just haven't caught the map_restart yet
+ Com_DPrintf( "%s : ignoring pre map_restart / outdated client message\n", cl->name );
+ return;
+ }
}
// if we can tell that the client has dropped the last
// gamestate we sent them, resend it
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list