diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index e5027802..df7259c6 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -650,18 +650,6 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) break; } - case SV_POINTS: - { - int count = getint(p); - loopi(count){ - int pcn = getint(p), score = getint(p); - playerent *ppl = pcn==getclientnum() ? player1 : getclient(pcn); - if (!ppl) break; - ppl->points = score; - } - break; - } - case SV_RESUME: { loopi(MAXCLIENTS) diff --git a/source/src/protocol.cpp b/source/src/protocol.cpp index d67099ef..f2f1b06e 100644 --- a/source/src/protocol.cpp +++ b/source/src/protocol.cpp @@ -339,7 +339,7 @@ static const int msgsizes[] = // size inclusive message token, 0 f SV_SWITCHNAME, 0, SV_SWITCHSKIN, 0, SV_SWITCHTEAM, 0, SV_CLIENT, 0, SV_EXTENSION, 0, - SV_MAPIDENT, 3, SV_HUDEXTRAS, 1, SV_POINTS, 0, + SV_MAPIDENT, 3, SV_HUDEXTRAS, 1, -1 }; diff --git a/source/src/protocol.h b/source/src/protocol.h index 2e586309..8f424d48 100644 --- a/source/src/protocol.h +++ b/source/src/protocol.h @@ -40,7 +40,7 @@ enum SV_SWITCHNAME, SV_SWITCHSKIN, SV_SWITCHTEAM, SV_CLIENT, SV_EXTENSION, - SV_MAPIDENT, SV_HUDEXTRAS, SV_POINTS, SV_NUM + SV_MAPIDENT, SV_HUDEXTRAS, SV_NUM }; #ifdef _DEBUG diff --git a/source/src/server.cpp b/source/src/server.cpp index 0da2f532..a07fd734 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -3157,36 +3157,36 @@ void linequalitystats(int elapsed) } } -void sendscores() -{ - if ( gamemillis < nextsendscore ) return; - int count = 0, list[MAXCLIENTS]; - loopv(clients) { - client &c = *clients[i]; - if ( c.type!=ST_TCPIP || !c.isauthed || !c.md.updatedpoints ) continue; - list[count] = i; - count++; - } - nextsendscore = gamemillis + (interm ? 10000 : 500); - if ( !count ) return; - - packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE); - putint(p, SV_POINTS); - putint(p,count); - int *v = list; - loopi(count) - { - client &c = *clients[*v]; - putint(p,c.clientnum); putint(p,c.state.points); c.md.updatedpoints = false; - v++; - } - ENetPacket *packet = p.finalize(); - - loopv(clients) - { - sendpacket(i, 1, packet); - } -} +// void sendscores() //FIXME +// { +// if ( gamemillis < nextsendscore ) return; +// int count = 0, list[MAXCLIENTS]; +// loopv(clients) { +// client &c = *clients[i]; +// if ( c.type!=ST_TCPIP || !c.isauthed || !c.md.updatedpoints ) continue; +// list[count] = i; +// count++; +// } +// nextsendscore = gamemillis + (interm ? 10000 : 500); +// if ( !count ) return; +// +// packetbuf p(MAXTRANS, ENET_PACKET_FLAG_RELIABLE); +// putint(p, SV_POINTS); +// putint(p,count); +// int *v = list; +// loopi(count) +// { +// client &c = *clients[*v]; +// putint(p,c.clientnum); putint(p,c.state.points); c.md.updatedpoints = false; +// v++; +// } +// ENetPacket *packet = p.finalize(); +// +// loopv(clients) +// { +// sendpacket(i, 1, packet); +// } +// } void serverslice(uint timeout) // main server update, called from cube main loop in sp, or dedicated server loop @@ -3330,7 +3330,6 @@ void serverslice(uint timeout) // main server update, called from cube main lo break; } } - sendscores(); sendworldstate(); }