diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 98c7dae6..32a0ced0 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -773,6 +773,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) player1->state = CS_ALIVE; player1->spectatemode = SM_NONE; } + player1->clientnum = getint(p); break; } diff --git a/source/src/protocol.cpp b/source/src/protocol.cpp index 6f289d7f..cb1d0da2 100644 --- a/source/src/protocol.cpp +++ b/source/src/protocol.cpp @@ -149,7 +149,7 @@ char msgsizesl[] = // size inclusive message token, 0 for variable SV_CALLVOTE, 0, SV_CALLVOTESUC, 1, SV_CALLVOTEERR, 2, SV_VOTE, 2, SV_VOTERESULT, 2, SV_FORCETEAM, 2, SV_AUTOTEAM, 2, SV_CHANGETEAM, 1, SV_WHOIS, 2, SV_WHOISINFO, 3, - SV_LISTDEMOS, 1, SV_SENDDEMOLIST, 0, SV_GETDEMO, 2, SV_SENDDEMO, 0, SV_DEMOPLAYBACK, 2, + SV_LISTDEMOS, 1, SV_SENDDEMOLIST, 0, SV_GETDEMO, 2, SV_SENDDEMO, 0, SV_DEMOPLAYBACK, 3, SV_CONNECT, 0, SV_CLIENT, 0, SV_EXTENSION, 0, diff --git a/source/src/server.cpp b/source/src/server.cpp index eab415c5..65e5c692 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -755,7 +755,7 @@ void enddemoplayback() gzclose(demoplayback); demoplayback = NULL; - sendf(-1, 1, "rii", SV_DEMOPLAYBACK, 0); + loopv(clients) sendf(i, 1, "ri3", SV_DEMOPLAYBACK, 0, i); sendservmsg("demo playback finished"); @@ -790,7 +790,7 @@ void setupdemoplayback() s_sprintf(msg)("playing demo \"%s\"", file); sendservmsg(msg); - sendf(-1, 1, "rii", SV_DEMOPLAYBACK, 1); + sendf(-1, 1, "ri3", SV_DEMOPLAYBACK, 1, -1); if(gzread(demoplayback, &nextplayback, sizeof(nextplayback))!=sizeof(nextplayback)) {