]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move an assault constant into the assault file
authorMario <mario@smbclan.net>
Sat, 9 Jun 2018 15:27:39 +0000 (01:27 +1000)
committerMario <mario@smbclan.net>
Sat, 9 Jun 2018 15:27:39 +0000 (01:27 +1000)
qcsrc/server/constants.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator/gamemode_assault.qh

index 86ed86da1d9e7b73f77e2baa77a9f69a87265b40..f98d586fb504cf389b764fb704360713d5a2148f 100644 (file)
@@ -17,5 +17,3 @@ const int RESPAWN_DENY = 4;
 #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT)
 
 const int NUM_PLAYERSKINS_TEAMPLAY = 3;
-
-const int ASSAULT_VALUE_INACTIVE = 1000;
index a09aec0f50bc3b7a80da6fa126cb5ad16239d5d3..bdd226b5c30b01219a2763adf9fe2af302cababa 100644 (file)
@@ -198,10 +198,10 @@ string NearestLocation(vector p)
     return ret;
 }
 
-string AmmoNameFromWeaponentity(entity wpn)
+string AmmoNameFromWeaponentity(Weapon wep)
 {
        string ammoitems = "batteries";
-       switch ((wpn.m_weapon).ammo_type)
+       switch (wep.ammo_type)
        {
                case RESOURCE_SHELLS:  ammoitems = ITEM_Shells.m_name;      break;
                case RESOURCE_BULLETS: ammoitems = ITEM_Bullets.m_name;     break;
@@ -266,7 +266,7 @@ string formatmessage(entity this, string msg)
                        case "y": replacement = NearestLocation(cursor); break;
                        case "d": replacement = NearestLocation(this.death_origin); break;
                        case "w": replacement = ((this.(weaponentity).m_weapon == WEP_Null) ? ((this.(weaponentity).m_switchweapon == WEP_Null) ? Weapons_from(this.(weaponentity).cnt) : this.(weaponentity).m_switchweapon) : this.(weaponentity).m_weapon).m_name; break;
-                       case "W": replacement = AmmoNameFromWeaponentity(this.(weaponentity)); break;
+                       case "W": replacement = AmmoNameFromWeaponentity(this.(weaponentity).m_weapon); break;
                        case "x": replacement = ((cursor_ent.netname == "" || !cursor_ent) ? "nothing" : cursor_ent.netname); break;
                        case "s": replacement = ftos(vlen(this.velocity - this.velocity_z * '0 0 1')); break;
                        case "S": replacement = ftos(vlen(this.velocity)); break;
index ea714e6a23ba4528f38b6e189386a69215dd6603..15d3a65ad18c2482c007a09612cd1b0dc7c307b0 100644 (file)
@@ -2,6 +2,8 @@
 
 #include "../gamemode.qh"
 
+const int ASSAULT_VALUE_INACTIVE = 1000;
+
 const int ST_ASSAULT_OBJECTIVES = 1;
 
 REGISTER_MUTATOR(as, false)