From: terencehill Date: Wed, 6 Sep 2017 14:05:52 +0000 (+0200) Subject: Fix mixed tabs and spaces in some newly added code X-Git-Tag: xonotic-v0.8.5~2480 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9dfc1086ecb84ee7088ca5526fb2894e888271b6;p=xonotic%2Fxonotic-data.pk3dir.git Fix mixed tabs and spaces in some newly added code --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 374096f24..9fc26c564 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -435,11 +435,10 @@ NET_HANDLE(ENT_CLIENT_SCORES, bool isnew) // RegisterPlayer(o); //playerchecker will do this for us later, if it has not already done so - int sf, lf; - sf = ReadShort(); - lf = ReadShort(); + int sf = ReadShort(); + int lf = ReadShort(); FOREACH(Scores, true, { - int p = 1 << (i % 16); + int p = 1 << (i % 16); if (sf & p) { if (lf & p) @@ -447,7 +446,7 @@ NET_HANDLE(ENT_CLIENT_SCORES, bool isnew) else o.(scores(it)) = ReadChar(); } - }); + }); return = true; @@ -461,18 +460,16 @@ NET_HANDLE(ENT_CLIENT_TEAMSCORES, bool isnew) { make_pure(this); int i; - entity o; this.team = ReadByte(); - o = this.owner = GetTeam(this.team, true); // these team numbers can always be trusted + entity o = this.owner = GetTeam(this.team, true); // these team numbers can always be trusted - int sf, lf; #if MAX_TEAMSCORE <= 8 - sf = ReadByte(); - lf = ReadByte(); + int sf = ReadByte(); + int lf = ReadByte(); #else - sf = ReadShort(); - lf = ReadShort(); + int sf = ReadShort(); + int lf = ReadShort(); #endif int p; for(i = 0, p = 1; i < MAX_TEAMSCORE; ++i, p *= 2) @@ -494,7 +491,7 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew) make_pure(this); float newspectatee_status; - int f = ReadByte(); + int f = ReadByte(); scoreboard_showscores_force = (f & BIT(0)); @@ -551,9 +548,9 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew) NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew) { make_pure(this); - int i, j, b, f; + int i, j, b, f; - int nags = ReadByte(); // NAGS NAGS NAGS NAGS NAGS NAGS NADZ NAGS NAGS NAGS + int nags = ReadByte(); // NAGS NAGS NAGS NAGS NAGS NAGS NADZ NAGS NAGS NAGS if(!(nags & BIT(2))) { @@ -609,23 +606,23 @@ NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew) NET_HANDLE(ENT_CLIENT_ELIMINATEDPLAYERS, bool isnew) { make_pure(this); - int sf; serialize(byte, 0, sf); + int sf; serialize(byte, 0, sf); if (sf & 1) { for (int j = 0; j < maxclients; ++j) { if (playerslots[j]) { - playerslots[j].eliminated = 1; + playerslots[j].eliminated = 1; } - } + } for (int i = 1; i <= maxclients; i += 8) { int f = 0; serialize(byte, 0, f); for (int b = 0; b < 8; ++b) { if (f & BIT(b)) continue; - int j = i - 1 + b; - if (playerslots[j]) { - playerslots[j].eliminated = 0; - } - } + int j = i - 1 + b; + if (playerslots[j]) { + playerslots[j].eliminated = 0; + } + } } } return true; @@ -643,7 +640,7 @@ NET_HANDLE(ENT_CLIENT_RANDOMSEED, bool isnew) NET_HANDLE(ENT_CLIENT_ACCURACY, bool isnew) { make_pure(this); - int sf = ReadInt24_t(); + int sf = ReadInt24_t(); if (sf == 0) { for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w) weapon_accuracy[w] = -1; @@ -653,7 +650,7 @@ NET_HANDLE(ENT_CLIENT_ACCURACY, bool isnew) int f = 1; for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w) { if (sf & f) { - int b = ReadByte(); + int b = ReadByte(); if (b == 0) weapon_accuracy[w] = -1; else if (b == 255) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 1b631c4b7..554da5f80 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -938,8 +938,8 @@ bool EliminatedPlayers_SendEntity(entity this, entity to, float sendflags) serialize(byte, out, sendflags); if (sendflags & 1) { for (int i = 1; i <= maxclients; i += 8) { - int f = 0; - entity e = edict_num(i); + int f = 0; + entity e = edict_num(i); for (int b = 0; b < 8; ++b, e = nextent(e)) { if (eliminatedPlayers.isEliminated(e)) { f |= BIT(b);