diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index d8662844..db60f781 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -631,7 +631,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) int pcn = getint(p); int score = getint(p); playerent *ppl = pcn == getclientnum() ? player1 : getclient(pcn); if (!ppl) break; - ppl->points = score; + ppl->points += score; } break; } diff --git a/source/src/server.cpp b/source/src/server.cpp index 1caf5205..3f2dc1a1 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -373,7 +373,7 @@ void sendextras() loopi(count) { client &c = *clients[*v]; - putint(p,c.clientnum); putint(p,c.state.points); c.md.updated = false; c.md.upmillis = 0; + putint(p,c.clientnum); putint(p,c.md.dpt); c.md.updated = false; c.md.upmillis = c.md.dpt = 0; v++; } diff --git a/source/src/server.h b/source/src/server.h index 4bbf8148..f3dc3abf 100644 --- a/source/src/server.h +++ b/source/src/server.h @@ -197,12 +197,12 @@ struct savedscore struct medals { - int dp, lasthit, lastgun, combohits, combo, combotime, combodamage, ncombos, ncovers, nhs; + int dpt, lasthit, lastgun, combohits, combo, combotime, combodamage, ncombos, ncovers, nhs; int ask, askmillis, linked, linkmillis, linkreason, upmillis; bool updated, combosend; void reset() { - dp = lasthit = lastgun = combohits = combo = combotime = combodamage = ncombos = ncovers = nhs = 0; + dpt = lasthit = lastgun = combohits = combo = combotime = combodamage = ncombos = ncovers = nhs = 0; askmillis = linkmillis = upmillis = 0; linkreason = linked = ask = -1; updated = combosend = false; diff --git a/source/src/serverchecks.h b/source/src/serverchecks.h index 9ddc4b9a..c09f071f 100644 --- a/source/src/serverchecks.h +++ b/source/src/serverchecks.h @@ -84,6 +84,7 @@ This part is related to medals system. WIP inline void addpt(client *c, int points) { c->state.points += points; + c->md.dpt += points; c->md.updated = true; c->md.upmillis = gamemillis + 200; }