X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=inline;f=qcsrc%2Fserver%2Fscores.qc;h=94bea2b44a662428e8259e36a0b08941f18e91d3;hb=8377697c8b9ee067de875dd7b2fef275aa183f56;hp=c66d23ca7c887d10a43dda357177f70ec2b0453c;hpb=10c0e93c75ef6f408e3357bd5fb46c721e7e0576;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index c66d23ca7..94bea2b44 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -1,7 +1,7 @@ #include "scores.qh" #include "command/common.qh" -#include "mutators/all.qh" +#include "mutators/_mod.qh" #include "../common/playerstats.qh" #include "../common/teams.qh" @@ -185,7 +185,7 @@ bool ScoreInfo_SendEntity(entity this, entity to, int sf) { float i; WriteHeader(MSG_ENTITY, ENT_CLIENT_SCORES_INFO); - WriteInt24_t(MSG_ENTITY, MapInfo_LoadedGametype); + WriteRegistered(Gametypes, MSG_ENTITY, MapInfo_LoadedGametype); FOREACH(Scores, true, { WriteString(MSG_ENTITY, scores_label(it)); WriteByte(MSG_ENTITY, scores_flags(it)); @@ -198,7 +198,7 @@ bool ScoreInfo_SendEntity(entity this, entity to, int sf) return true; } -void ScoreInfo_Init(float teams) +void ScoreInfo_Init(int teams) { if(scores_initialized) { @@ -209,13 +209,13 @@ void ScoreInfo_Init(float teams) scores_initialized = new_pure(ent_client_scoreinfo); Net_LinkEntity(scores_initialized, false, 0, ScoreInfo_SendEntity); } - if(teams >= 1) + if(teams & BIT(0)) TeamScore_Spawn(NUM_TEAM_1, "Red"); - if(teams >= 2) + if(teams & BIT(1)) TeamScore_Spawn(NUM_TEAM_2, "Blue"); - if(teams >= 3) + if(teams & BIT(2)) TeamScore_Spawn(NUM_TEAM_3, "Yellow"); - if(teams >= 4) + if(teams & BIT(3)) TeamScore_Spawn(NUM_TEAM_4, "Pink"); } @@ -314,7 +314,7 @@ void PlayerScore_Detach(entity player) { if(!player.scorekeeper) error("player has no scorekeeper"); - remove(player.scorekeeper); + delete(player.scorekeeper); player.scorekeeper = NULL; } @@ -333,7 +333,7 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score) { if(gameover) return 0; - LOG_WARNING("Adding score to unknown player!"); + LOG_WARN("Adding score to unknown player!"); return 0; } if(score)