]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove useles havocbot_role_flags field
authorterencehill <piuntn@gmail.com>
Thu, 14 Jun 2018 17:29:34 +0000 (19:29 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 14 Jun 2018 17:29:34 +0000 (19:29 +0200)
qcsrc/common/gamemodes/gamemode/assault/assault.qc
qcsrc/common/gamemodes/gamemode/assault/assault.qh
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qh

index a05ab40e6dd95564d451fd40c8a8d4f5c644f756..1a9fff10cb4b1c54ce1f4bb7930365dffe9f7940 100644 (file)
@@ -523,12 +523,10 @@ void havocbot_role_ast_setrole(entity this, float role)
        {
                case HAVOCBOT_AST_ROLE_DEFENSE:
                        this.havocbot_role = havocbot_role_ast_defense;
-                       this.havocbot_role_flags = HAVOCBOT_AST_ROLE_DEFENSE;
                        this.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_AST_ROLE_OFFENSE:
                        this.havocbot_role = havocbot_role_ast_offense;
-                       this.havocbot_role_flags = HAVOCBOT_AST_ROLE_OFFENSE;
                        this.havocbot_role_timeout = 0;
                        break;
        }
index d949f18b34700775cd5ecc5429b78373a862c07b..ff65b66ed23923be629d0f6e16166370ff645080 100644 (file)
@@ -32,7 +32,6 @@ const int HAVOCBOT_AST_ROLE_NONE = 0;
 const int HAVOCBOT_AST_ROLE_DEFENSE = 2;
 const int HAVOCBOT_AST_ROLE_OFFENSE = 4;
 
-.int havocbot_role_flags;
 .float havocbot_attack_time;
 
 void(entity this) havocbot_role_ast_defense;
index 4caf054e0d400b937118cfc7f513258217250c3b..f5095bce4156fe9fae8aa978abb7d6936564227f 100644 (file)
@@ -1260,29 +1260,24 @@ void havocbot_goalrating_ons_offenseitems(entity this, float ratingscale, vector
 
 void havocbot_role_ons_setrole(entity this, int role)
 {
-       LOG_DEBUG(this.netname," switched to ");
        switch(role)
        {
                case HAVOCBOT_ONS_ROLE_DEFENSE:
-                       LOG_DEBUG("defense");
+                       LOG_DEBUG(this.netname, " switched to defense");
                        this.havocbot_role = havocbot_role_ons_defense;
-                       this.havocbot_role_flags = HAVOCBOT_ONS_ROLE_DEFENSE;
                        this.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_ONS_ROLE_ASSISTANT:
-                       LOG_DEBUG("assistant");
+                       LOG_DEBUG(this.netname, " switched to assistant");
                        this.havocbot_role = havocbot_role_ons_assistant;
-                       this.havocbot_role_flags = HAVOCBOT_ONS_ROLE_ASSISTANT;
                        this.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_ONS_ROLE_OFFENSE:
-                       LOG_DEBUG("offense");
+                       LOG_DEBUG(this.netname, " switched to offense");
                        this.havocbot_role = havocbot_role_ons_offense;
-                       this.havocbot_role_flags = HAVOCBOT_ONS_ROLE_OFFENSE;
                        this.havocbot_role_timeout = 0;
                        break;
        }
-       LOG_DEBUG("");
 }
 
 void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale)
@@ -1309,7 +1304,7 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale
                // (easier and cleaner than keeping counters per cp and teams)
                FOREACH_CLIENT(it != this && IS_PLAYER(it), {
                        if(SAME_TEAM(it, this))
-                       if(it.havocbot_role_flags & HAVOCBOT_ONS_ROLE_OFFENSE)
+                       if(it.havocbot_role == havocbot_role_ons_offense)
                        if(it.havocbot_ons_target == cp2)
                                ++c;
                });
index 5c7fd469735b1e38cad2abdf8e11165d9ffb3d66..7a9b192a5a7b041e313c807dd464b04d3e0c3e98 100644 (file)
@@ -80,7 +80,6 @@ const int HAVOCBOT_ONS_ROLE_OFFENSE   = 8;
 
 .entity havocbot_ons_target;
 
-.int havocbot_role_flags;
 .float havocbot_attack_time;
 
 void havocbot_role_ons_defense(entity this);