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 e34aa66..e01d30b 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 b14d1bc..2e69c5f 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 51fd20f..e45a901 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 7ebde34..717a41a 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 da6b1e8..c435aba 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 0e02098..cc0cb77 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';
                                }
                        }