]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix some minor issues
authorMario <zacjardine@y7mail.com>
Thu, 13 Nov 2014 03:32:01 +0000 (14:32 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 13 Nov 2014 03:32:01 +0000 (14:32 +1100)
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/weapons.qc
qcsrc/server/autocvars.qh
qcsrc/server/mutators/mutator_melee_only.qc
qcsrc/server/t_items.qc

index e34aa660927bb04ded273432d807f5d9515b2d24..e01d30be9b5e15d73a2b0c04143e058ff231d3d6 100644 (file)
@@ -185,6 +185,8 @@ void W_Arc_Beam_Think(void)
        }
 
        if(
+               !IS_PLAYER(self.owner)
+               ||
                (self.owner.WEP_AMMO(ARC) <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO))
                ||
                self.owner.deadflag != DEAD_NO
@@ -1162,16 +1164,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
-                               self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       self.beam_image = "particles/lgbeam";
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
                        case ARC_BT_WALL: // grenadelauncher_muzzleflash healray_muzzleflash
@@ -1185,16 +1190,19 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; // particleeffectnum("grenadelauncher_muzzleflash");
+                               self.beam_muzzleeffect = -1; // particleeffectnum("grenadelauncher_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
                        case ARC_BT_HEAL:
@@ -1208,16 +1216,20 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       self.beam_image = "particles/lgbeam";
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
                        case ARC_BT_HIT:
@@ -1231,16 +1243,20 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 0;
                                self.beam_hitlight[3] = 0;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 50;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 0;
                                self.beam_muzzlelight[3] = 0;
                                self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       self.beam_image = "particles/lgbeam";
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
                        case ARC_BT_BURST_MISS:
@@ -1254,7 +1270,7 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
@@ -1277,16 +1293,20 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       self.beam_image = "particles/lgbeam";
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
                        case ARC_BT_BURST_HEAL:
@@ -1300,16 +1320,20 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       self.beam_image = "particles/lgbeam";
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
                        case ARC_BT_BURST_HIT:
@@ -1323,16 +1347,20 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       self.beam_image = "particles/lgbeam";
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
 
@@ -1348,16 +1376,20 @@ void Ent_ReadArcBeam(float isnew)
                                self.beam_hitlight[1] = 1;
                                self.beam_hitlight[2] = 1;
                                self.beam_hitlight[3] = 1;
-                               self.beam_muzzleeffect = FALSE; //particleeffectnum("nex_muzzleflash");
+                               self.beam_muzzleeffect = -1; //particleeffectnum("nex_muzzleflash");
                                self.beam_muzzlelight[0] = 0;
                                self.beam_muzzlelight[1] = 1;
                                self.beam_muzzlelight[2] = 1;
                                self.beam_muzzlelight[3] = 1;
                                self.beam_image = "particles/lgbeam";
-                               setmodel(flash, "models/flash.md3");
-                               flash.alpha = self.beam_alpha;
-                               flash.colormod = self.beam_color;
-                               flash.scale = 0.5;
+                               if(self.beam_muzzleeffect >= 0)
+                               {
+                                       self.beam_image = "particles/lgbeam";
+                                       setmodel(flash, "models/flash.md3");
+                                       flash.alpha = self.beam_alpha;
+                                       flash.colormod = self.beam_color;
+                                       flash.scale = 0.5;
+                               }
                                break;
                        }
                }
index b14d1bcd49dd6599c964c8b72d8ae06693aee04c..2e69c5f537538b7ff734861016a8550df3d54b00 100644 (file)
@@ -563,8 +563,8 @@ float W_Devastator(float req)
                }
                case WR_INIT:
                {
-                       if(autocvar_sv_precacheweapons)
-                       {
+                       //if(autocvar_sv_precacheweapons)
+                       //{
                                precache_model("models/flash.md3");
                                precache_model("models/weapons/g_rl.md3");
                                precache_model("models/weapons/v_rl.md3");
@@ -572,7 +572,7 @@ float W_Devastator(float req)
                                precache_sound("weapons/rocket_det.wav");
                                precache_sound("weapons/rocket_fire.wav");
                                precache_sound("weapons/rocket_mode.wav");
-                       }
+                       //}
                        DEVASTATOR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
                        return TRUE;
                }
index 51fd20f5a05f89640be51029256e8917488f2fc0..e45a901c3c62a2e13e3344a669d908c0bd8e507d 100644 (file)
@@ -173,6 +173,20 @@ string W_NameWeaponOrder_MapFunc(string s)
        }
        return s;
 }
+
+string W_UndeprecateName(string s)
+{
+       switch ( s )
+       {
+               case "nex"            : return "vortex";
+               case "rocketlauncher" : return "devastator"; 
+               case "laser"          : return "blaster";
+               case "minstanex"      : return "vaporizer";
+               case "grenadelauncher": return "mortar";
+               case "uzi"            : return "machinegun";
+               default               : return s;
+       }
+}
 string W_NameWeaponOrder(string order)
 {
        return mapPriorityList(order, W_NameWeaponOrder_MapFunc);
@@ -182,6 +196,7 @@ string W_NumberWeaponOrder_MapFunc(string s)
        float i;
        if(s == "0" || stof(s))
                return s;
+       s = W_UndeprecateName(s);
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
                if(s == get_weaponinfo(i).netname)
                        return ftos(i);
index 7ebde3405acb03401c50f201ae04360b5926d0f7..717a41ae1f9242e4c2dae8b856fd2b21431a8706 100644 (file)
@@ -641,7 +641,7 @@ float autocvar_sv_maxairstrafespeed;
 float autocvar_sv_maxspeed;
 string autocvar_sv_motd;
 float autocvar_sv_precacheplayermodels;
-float autocvar_sv_precacheweapons;
+//float autocvar_sv_precacheweapons; // WEAPONTODO?
 float autocvar_sv_q3acompat_machineshotgunswap;
 float autocvar_sv_ready_restart;
 float autocvar_sv_ready_restart_after_countdown;
index da6b1e84bd6689847ac7ae16f8ed6673c9387b66..c435aba0342c64e9c9fb3e238f2d5982772725d6 100644 (file)
@@ -1,7 +1,7 @@
 MUTATOR_HOOKFUNCTION(melee_SetStartItems)
 {
        start_ammo_shells = warmup_start_ammo_shells = 0;
-       start_weapons = warmup_start_weapons = WEPSET_SHOCKWAVE;
+       start_weapons = warmup_start_weapons = WEPSET_SHOTGUN;
 
        return FALSE;
 }
index 0e0209892d447fec334eecfe976d8a368cdd2f92..cc0cb773ab2b1adbf480ed5c80c5ec2ed8fd23b4 100644 (file)
@@ -434,7 +434,7 @@ void Item_RespawnCountdown (void)
                                entity wi = get_weaponinfo(self.weapon);
                                if(wi)
                                {
-                                       name = wi.model2;
+                                       name = wi.wpmodel;
                                        rgb = '1 0 0';
                                }
                        }