X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fvaporizer.qc;h=399ce4e584366b2dd0e54c1fa4f645eeafab0665;hp=aa1fb54c102ee375d30e7b0d9011b7e326305fe7;hb=1c758278958da8f2baf1f39cd0f298d5bda097a2;hpb=eeec5ec4584c71acbb89db6eea843b48d6ca4c26 diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index aa1fb54c10..399ce4e584 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -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) \ @@ -70,17 +71,17 @@ void W_RocketMinsta_Explosion(vector loc) void W_Vaporizer_Attack(void) {SELFPARAM(); - float flying; - flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last + bool flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last + float 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, W_Sound("minstanexfire"), 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.m_id); + FireRailgunBullet(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, vaporizer_damage, 800, 0, 0, 0, 0, WEP_VAPORIZER.m_id); if(yoda && flying) Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);