From: Mario Date: Thu, 13 Nov 2014 03:32:01 +0000 (+1100) Subject: Fix some minor issues X-Git-Tag: xonotic-v0.8.0~152^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fff8ca8a8ef9a10324d8ebd660da0d6a3ff5a658;p=xonotic%2Fxonotic-data.pk3dir.git Fix some minor issues --- diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index e34aa6609..e01d30be9 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -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; } } diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index b14d1bcd4..2e69c5f53 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -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; } diff --git a/qcsrc/common/weapons/weapons.qc b/qcsrc/common/weapons/weapons.qc index 51fd20f5a..e45a901c3 100644 --- a/qcsrc/common/weapons/weapons.qc +++ b/qcsrc/common/weapons/weapons.qc @@ -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); diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 7ebde3405..717a41ae1 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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; diff --git a/qcsrc/server/mutators/mutator_melee_only.qc b/qcsrc/server/mutators/mutator_melee_only.qc index da6b1e84b..c435aba03 100644 --- a/qcsrc/server/mutators/mutator_melee_only.qc +++ b/qcsrc/server/mutators/mutator_melee_only.qc @@ -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; } diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 0e0209892..cc0cb773a 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -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'; } }