]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Redefine setcolor
authorMario <mario@smbclan.net>
Sun, 21 Aug 2016 03:05:19 +0000 (13:05 +1000)
committerMario <mario@smbclan.net>
Sun, 21 Aug 2016 03:05:19 +0000 (13:05 +1000)
qcsrc/dpdefs/post.qh
qcsrc/dpdefs/pre.qh
qcsrc/server/bot/default/bot.qc
qcsrc/server/cl_client.qc
qcsrc/server/teamplay.qc
qcsrc/server/teamplay.qh

index 9419dceea18aafb7f8e75f1063b0ab8a3d79c523..16fd93450332e44fa0952d7003f6c50fb1fc6b03 100644 (file)
@@ -8,6 +8,7 @@
 #undef objerror
 #undef remove
 #undef walkmove
+#undef setcolor
 
 #ifdef MENUQC
        #define NULL (0, null_entity)
index 801b8731bc89bf08bdcf8d5ed52c445763986c3e..63cebbc1acd6e0cd74ece6de92ad524cbac82f1e 100644 (file)
@@ -8,3 +8,4 @@
 #define objerror builtin_objerror
 #define remove builtin_remove
 #define walkmove builtin_walkmove
+#define setcolor builtin_setcolor
index 8ee00e7d5cca3176308647e6e69d2f593af71d73..cab38143db598d743f377c3556736116782e2f84 100644 (file)
@@ -224,7 +224,7 @@ void bot_setnameandstuff(entity this)
        this.bot_config_loaded = true;
 
        // this is really only a default, JoinBestTeam is called later
-       set_color(this, stof(bot_shirt) * 16 + stof(bot_pants));
+       setcolor(this, stof(bot_shirt) * 16 + stof(bot_pants));
        this.bot_preferredcolors = this.clientcolors;
 
        // pick the name
@@ -340,7 +340,7 @@ void bot_endgame()
        e = bot_list;
        while (e)
        {
-               set_color(e, e.bot_preferredcolors);
+               setcolor(e, e.bot_preferredcolors);
                e = e.nextbot;
        }
        // if dynamic waypoints are ever implemented, save them here
index 85bfd4eb69138caf30a689e789d4abbe170768a0..0a608e979bff5da3e4b535fed7019bc0a9fb2301 100644 (file)
@@ -471,7 +471,7 @@ void FixPlayermodel(entity player)
        if(!teamplay)
                if(strlen(autocvar_sv_defaultplayercolors))
                        if(player.clientcolors != stof(autocvar_sv_defaultplayercolors))
-                               set_color(player, stof(autocvar_sv_defaultplayercolors));
+                               setcolor(player, stof(autocvar_sv_defaultplayercolors));
 }
 
 
index a1ff864664672ccf1d0877bd78252504e9e4dd27..9af668f14e9f1b7805ae7172be18adf9b3d63c0a 100644 (file)
@@ -158,13 +158,13 @@ string getwelcomemessage(entity this)
        return s;
 }
 
-void set_color(entity this, int clr)
+void setcolor(entity this, int clr)
 {
 #if 0
        this.clientcolors = clr;
        this.team = (clr & 15) + 1;
 #else
-       setcolor(this, clr);
+       builtin_setcolor(this, clr);
 #endif
 }
 
@@ -183,9 +183,9 @@ void SetPlayerColors(entity pl, float _color)
 
 
        if(teamplay) {
-               set_color(pl, 16*pants + pants);
+               setcolor(pl, 16*pants + pants);
        } else {
-               set_color(pl, shirt + pants);
+               setcolor(pl, shirt + pants);
        }
 }
 
index f34c6d59df438b491090956b2e7782153f3f7da3..127ac7a6d30caffc887e9571c40104148813eadb 100644 (file)
@@ -50,3 +50,5 @@ int JoinBestTeam(entity this, bool only_return_best, bool forcebestteam);
 //void() ctf_playerchanged;
 
 void ShufflePlayerOutOfTeam (float source_team);
+
+void setcolor(entity this, int clr);