Merge branch 'master' into Mario/vaporizer_damage 215/head
authorMario <zacjardine@y7mail.com>
Mon, 31 Aug 2015 14:15:08 +0000 (00:15 +1000)
committerMario <zacjardine@y7mail.com>
Mon, 31 Aug 2015 14:15:08 +0000 (00:15 +1000)
# Conflicts:
# qcsrc/common/weapons/w_vaporizer.qc
# qcsrc/server/cl_player.qc

bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/server/cl_player.qc
qcsrc/server/mutators/mutator_instagib.qc
vehicles.cfg

index c3fefe3..4800657 100644 (file)
@@ -433,6 +433,7 @@ set g_balance_porto_weaponthrowable 1
 // {{{ #12: Vaporizer
 set g_balance_vaporizer_primary_ammo 10
 set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage -1
 set g_balance_vaporizer_primary_refire 1
 set g_balance_vaporizer_reload_ammo 0
 set g_balance_vaporizer_reload_time 0
index c0cb54a..9fde147 100644 (file)
@@ -486,6 +486,7 @@ set g_balance_porto_weaponthrowable 1
 // {{{ #13: Vaporizer
 set g_balance_vaporizer_primary_ammo 10
 set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage 150
 set g_balance_vaporizer_primary_refire 1
 set g_balance_vaporizer_reload_ammo 0
 set g_balance_vaporizer_reload_time 0
index f65891c..ce00717 100644 (file)
@@ -433,6 +433,7 @@ set g_balance_porto_weaponthrowable 1
 // {{{ #12: Vaporizer
 set g_balance_vaporizer_primary_ammo 10
 set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage -1
 set g_balance_vaporizer_primary_refire 1
 set g_balance_vaporizer_reload_ammo 0
 set g_balance_vaporizer_reload_time 0
index 1fa36d0..ec50bdf 100644 (file)
@@ -433,6 +433,7 @@ set g_balance_porto_weaponthrowable 1
 // {{{ #12: Vaporizer
 set g_balance_vaporizer_primary_ammo 10
 set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage 150
 set g_balance_vaporizer_primary_refire 1
 set g_balance_vaporizer_reload_ammo 0
 set g_balance_vaporizer_reload_time 0
index 1fa36d0..ec50bdf 100644 (file)
@@ -433,6 +433,7 @@ set g_balance_porto_weaponthrowable 1
 // {{{ #12: Vaporizer
 set g_balance_vaporizer_primary_ammo 10
 set g_balance_vaporizer_primary_animtime 0.3
+set g_balance_vaporizer_primary_damage 150
 set g_balance_vaporizer_primary_refire 1
 set g_balance_vaporizer_reload_ammo 0
 set g_balance_vaporizer_reload_time 0
index 4ed2dc2..256019d 100644 (file)
@@ -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)
 {
-       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);
index 7625397..6310d7f 100644 (file)
@@ -548,6 +548,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, int deathtyp
         attacker.accuracy.(accuracy_frags[w-1]) += 1;
 
                MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, self, deathtype);
+               excess = frag_damage;
 
                WEP_ACTION(self.weapon, WR_PLAYERDEATH);
 
index 2e76d70..77b7559 100644 (file)
@@ -388,6 +388,14 @@ MUTATOR_HOOKFUNCTION(instagib_ItemCountdown)
        return false;
 }
 
+MUTATOR_HOOKFUNCTION(instagib_PlayerDies)
+{      
+       if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER.m_id))
+               frag_damage = 1000; // always gib if it was a vaporizer death
+
+       return FALSE;
+}
+
 MUTATOR_HOOKFUNCTION(instagib_ItemTouch)
 {
        if(self.ammo_cells)
@@ -473,6 +481,7 @@ MUTATOR_DEFINITION(mutator_instagib)
        MUTATOR_HOOK(FilterItem, instagib_FilterItem, CBC_ORDER_ANY);
        MUTATOR_HOOK(CustomizeWaypoint, instagib_CustomizeWaypoint, CBC_ORDER_ANY);
        MUTATOR_HOOK(Item_RespawnCountdown, instagib_ItemCountdown, CBC_ORDER_ANY);
+       MUTATOR_HOOK(PlayerDies, instagib_PlayerDies, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, instagib_SplitHealthArmor, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerPowerups, instagib_PlayerPowerups, CBC_ORDER_ANY);
        MUTATOR_HOOK(ForbidThrowCurrentWeapon, instagib_ForbidThrowing, CBC_ORDER_ANY);
index b5f0178..0fefec6 100644 (file)
@@ -30,6 +30,6 @@ set g_vehicles_delayspawn_jitter 10
 set g_vehicles_vortex_damagerate 0.5
 set g_vehicles_machinegun_damagerate 0.65
 set g_vehicles_rifle_damagerate 1
-set g_vehicles_vaporizer_damagerate 0.007
+set g_vehicles_vaporizer_damagerate 0.8
 set g_vehicles_tag_damagerate 2