X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fw_vaporizer.qc;h=649f0e314c894e7b2d76ac775e1fcea4f8b4b435;hb=253cc10990569fd90917dba809ce03c90fc89336;hp=0e78dbae93f98336bc5131ad90f9ea219c12f784;hpb=bb80a6aba067167c6ef8d5f3465f03bd34142fa2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/w_vaporizer.qc b/qcsrc/common/weapons/w_vaporizer.qc index 0e78dbae9..649f0e314 100644 --- a/qcsrc/common/weapons/w_vaporizer.qc +++ b/qcsrc/common/weapons/w_vaporizer.qc @@ -9,7 +9,7 @@ REGISTER_WEAPON( /* color */ '0.5 1 1', /* modelname */ "minstanex", /* simplemdl */ "foobar", -/* crosshair */ "gfx/crosshairminstanex 0.4", +/* crosshair */ "gfx/crosshairminstanex 0.6", /* wepimg */ "weaponminstanex", /* refname */ "vaporizer", /* wepname */ _("Vaporizer") @@ -19,6 +19,7 @@ REGISTER_WEAPON( #define VAPORIZER_SETTINGS_LIST(w_cvar,w_prop,id,sn) \ w_cvar(id, sn, PRI, ammo) \ w_cvar(id, sn, PRI, animtime) \ + w_cvar(id, sn, PRI, damage) \ w_cvar(id, sn, PRI, refire) \ w_cvar(id, sn, SEC, ammo) \ w_cvar(id, sn, SEC, animtime) \ @@ -53,17 +54,18 @@ void spawnfunc_weapon_minstanex(void) { spawnfunc_weapon_vaporizer(); } void W_Vaporizer_Attack(void) { - float flying; + float flying, vaporizer_damage; flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last + vaporizer_damage = ((WEP_CVAR_PRI(vaporizer, damage) > 0) ? WEP_CVAR_PRI(vaporizer, damage) : 10000); - W_SetupShot(self, true, 0, "", CH_WEAPON_A, 10000); + W_SetupShot(self, true, 0, "", CH_WEAPON_A, vaporizer_damage); // handle sound separately so we can change the volume // added bonus: no longer plays the strength sound (strength gives no bonus to instakill anyway) sound (self, CH_WEAPON_A, "weapons/minstanexfire.wav", VOL_BASE * 0.8, ATTEN_NORM); yoda = 0; damage_goodhits = 0; - FireRailgunBullet(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 10000, 800, 0, 0, 0, 0, WEP_VAPORIZER); + FireRailgunBullet(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, vaporizer_damage, 800, 0, 0, 0, 0, WEP_VAPORIZER); if(yoda && flying) Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); @@ -164,8 +166,10 @@ float W_Vaporizer(float req) W_DecreaseAmmo(WEP_CVAR_SEC(vaporizer, ammo)); // ugly instagib hack to reuse the fire mode of the laser + int oldwep = self.weapon; // we can't avoid this hack + self.weapon = WEP_BLASTER; W_Blaster_Attack( - WEP_VAPORIZER | HITTYPE_SECONDARY, + WEP_BLASTER | HITTYPE_SECONDARY, WEP_CVAR_SEC(vaporizer, shotangle), WEP_CVAR_SEC(vaporizer, damage), WEP_CVAR_SEC(vaporizer, edgedamage), @@ -176,6 +180,7 @@ float W_Vaporizer(float req) WEP_CVAR_SEC(vaporizer, delay), WEP_CVAR_SEC(vaporizer, lifetime) ); + self.weapon = oldwep; // now do normal refire weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);