diff --git a/source/src/client.cpp b/source/src/client.cpp index 9fcedd82..32d77496 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -247,6 +247,7 @@ void addmsg(int type, const char *fmt, ...) static int lastupdate = -1000, lastping = 0; bool senditemstoserver = false; // after a map change, since server doesn't have map data +bool watchingdemo = false; // flowtron : enables SV_ITEMLIST in demos - req. because mapchanged == false by then void sendpackettoserv(int chan, ENetPacket *packet) { diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 78bddb00..d61da8c4 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -4,7 +4,7 @@ #include "cube.h" #include "bot/bot.h" -extern bool c2sinit, senditemstoserver; +extern bool c2sinit, senditemstoserver, watchingdemo; extern string clientpassword; void neterr(const char *s) @@ -222,8 +222,8 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) case SV_ITEMLIST: { int n; - if(mapchanged) { senditemstoserver = false; resetspawns(); } - while((n = getint(p))!=-1) if(mapchanged) setspawn(n, true); + if(mapchanged||watchingdemo) { senditemstoserver = false; resetspawns(); } + while((n = getint(p))!=-1) if(mapchanged||watchingdemo) setspawn(n, true); break; } @@ -674,7 +674,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) case SV_DEMOPLAYBACK: { - demoplayback = getint(p)!=0; + watchingdemo = demoplayback = getint(p)!=0; if(demoplayback) { player1->state = CS_SPECTATE;