X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores.qc;h=10f5d12fcdd76b47fb0efeb139f42ff7baf60875;hb=dbdc35464a18f62bf550a20eddac9ec16b0eacee;hp=6c7a7dbc3350208546216979e4df167e2a1bf004;hpb=b8f71d297050680a3b25b063375ca5feec9ff67b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 6c7a7dbc3..10f5d12fc 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -56,7 +56,7 @@ float TeamScore_SendEntity(entity to, float sendflags) longflags = 0; for(i = 0, p = 1; i < MAX_TEAMSCORE; ++i, p *= 2) - if(self.teamscores[i] > 127 || self.teamscores[i] <= -128) + if(self.(teamscores[i]) > 127 || self.(teamscores[i]) <= -128) longflags |= p; #if MAX_TEAMSCORE <= 8 @@ -70,9 +70,9 @@ float TeamScore_SendEntity(entity to, float sendflags) if(sendflags & p) { if(longflags & p) - WriteInt24_t(MSG_ENTITY, self.teamscores[i]); + WriteInt24_t(MSG_ENTITY, self.(teamscores[i])); else - WriteChar(MSG_ENTITY, self.teamscores[i]); + WriteChar(MSG_ENTITY, self.(teamscores[i])); } return TRUE; @@ -173,7 +173,7 @@ float ScoreInfo_SendEntity(entity to, float sf) { float i; WriteByte(MSG_ENTITY, ENT_CLIENT_SCORES_INFO); - WriteByte(MSG_ENTITY, game); + WriteInt24_t(MSG_ENTITY, MapInfo_LoadedGametype); for(i = 0; i < MAX_SCORE; ++i) { WriteString(MSG_ENTITY, scores_label[i]); @@ -222,7 +222,7 @@ float PlayerScore_SendEntity(entity to, float sendflags) longflags = 0; for(i = 0, p = 1; i < MAX_SCORE; ++i, p *= 2) - if(self.scores[i] > 127 || self.scores[i] <= -128) + if(self.(scores[i]) > 127 || self.(scores[i]) <= -128) longflags |= p; #if MAX_SCORE <= 8 @@ -236,9 +236,9 @@ float PlayerScore_SendEntity(entity to, float sendflags) if(sendflags & p) { if(longflags & p) - WriteInt24_t(MSG_ENTITY, self.scores[i]); + WriteInt24_t(MSG_ENTITY, self.(scores[i])); else - WriteChar(MSG_ENTITY, self.scores[i]); + WriteChar(MSG_ENTITY, self.(scores[i])); } return TRUE; @@ -254,7 +254,8 @@ void PlayerScore_Clear(entity player) if(g_lms) return; if(g_arena || g_ca) return; - if(g_race && !g_race_qualifying) return; + if(g_cts) return; // in CTS, you don't lose score by observing + if(g_race && g_race_qualifying) return; // in qualifying, you don't lose score by observing sk = player.scorekeeper; for(i = 0; i < MAX_SCORE; ++i) @@ -337,8 +338,8 @@ float PlayerScore_Add(entity player, float scorefield, float score) if(score) if(scores_label[scorefield] != "") s.SendFlags |= pow(2, scorefield); - PlayerStats_Event(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label[scorefield]), score); - s.(scores_accumulated[scorefield]) += score; + if(!inWarmupStage) + PlayerStats_Event(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label[scorefield]), score); return (s.(scores[scorefield]) += score); } @@ -375,7 +376,6 @@ void WinningConditionHelper() entity winnerscorekeeper; entity secondscorekeeper; entity sk; - float slots; // format: // gametype:P:S::plabel,plabel:tlabel,tlabel:teamid:tscore,tscore:teamid:tscore,tscore @@ -386,7 +386,9 @@ void WinningConditionHelper() s = GetGametype(); s = strcat(s, ":", autocvar_g_xonoticversion); s = strcat(s, ":P", ftos(cvar_purechanges_count)); - s = strcat(s, ":S", ftos(nJoinAllowed(0))); + s = strcat(s, ":S", ftos(nJoinAllowed(world))); + s = strcat(s, ":F", ftos(serverflags)); + s = strcat(s, ":M", modname); s = strcat(s, "::", GetPlayerScoreString(world, 1)); // make this 1 once we can, note: this doesn't contain any : fullstatus = autocvar_g_full_getstatus_responses;