]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/scores.qc
Remove SELFPARAM() from .think and .touch
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / scores.qc
index b09657e6a5832d8b93bae23b537daaa26fe6946e..efefcd17aaa26cf16897100a0123270dba7eba42 100644 (file)
@@ -65,7 +65,7 @@ bool TeamScore_SendEntity(entity this, 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(this.(teamscores[i]) > 127 || this.(teamscores[i]) <= -128)
                        longflags |= p;
 
 #if MAX_TEAMSCORE <= 8
@@ -79,9 +79,9 @@ bool TeamScore_SendEntity(entity this, entity to, float sendflags)
                if(sendflags & p)
                {
                        if(longflags & p)
-                               WriteInt24_t(MSG_ENTITY, self.(teamscores[i]));
+                               WriteInt24_t(MSG_ENTITY, this.(teamscores[i]));
                        else
-                               WriteChar(MSG_ENTITY, self.(teamscores[i]));
+                               WriteChar(MSG_ENTITY, this.(teamscores[i]));
                }
 
        return true;
@@ -233,11 +233,11 @@ bool PlayerScore_SendEntity(entity this, entity to, float sendflags)
        float i, p, longflags;
 
        WriteHeader(MSG_ENTITY, ENT_CLIENT_SCORES);
-       WriteByte(MSG_ENTITY, etof(self.owner));
+       WriteByte(MSG_ENTITY, etof(this.owner));
 
        longflags = 0;
        for(i = 0, p = 1; i < MAX_SCORE; ++i, p *= 2)
-               if(self.(scores[i]) > 127 || self.(scores[i]) <= -128)
+               if(this.(scores[i]) > 127 || this.(scores[i]) <= -128)
                        longflags |= p;
 
 #if MAX_SCORE <= 8
@@ -251,9 +251,9 @@ bool PlayerScore_SendEntity(entity this, entity to, float sendflags)
                if(sendflags & p)
                {
                        if(longflags & p)
-                               WriteInt24_t(MSG_ENTITY, self.(scores[i]));
+                               WriteInt24_t(MSG_ENTITY, this.(scores[i]));
                        else
-                               WriteChar(MSG_ENTITY, self.(scores[i]));
+                               WriteChar(MSG_ENTITY, this.(scores[i]));
                }
 
        return true;
@@ -406,7 +406,7 @@ void WinningConditionHelper()
        s = GetGametype();
        s = strcat(s, ":", autocvar_g_xonoticversion);
        s = strcat(s, ":P", ftos(cvar_purechanges_count));
-       s = strcat(s, ":S", ftos(nJoinAllowed(self, world)));
+       s = strcat(s, ":S", ftos(nJoinAllowed(this, world))); // note: self/this is most likely world in this case
        s = strcat(s, ":F", ftos(serverflags));
        s = strcat(s, ":M", modname);
        s = strcat(s, "::", GetPlayerScoreString(world, (fullstatus ? 1 : 2)));