]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/vaporizer_damage
authorMario <zacjardine@y7mail.com>
Tue, 20 Jan 2015 00:57:08 +0000 (11:57 +1100)
committerMario <zacjardine@y7mail.com>
Tue, 20 Jan 2015 00:57:08 +0000 (11:57 +1100)
1  2 
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
qcsrc/server/cl_player.qc
qcsrc/server/mutators/mutator_instagib.qc

diff --combined bal-wep-nexuiz25.cfg
index b9e6da4c3f8c0ab4376f8cf40be17458e16e262d,c3fefe39da2ab6e9a3e0267e612ff010a7fa4bfd..4800657f73e0ab64d250912f39fd2ba922e420ae
@@@ -433,7 -433,6 +433,7 @@@ set g_balance_porto_weaponthrowable 
  // {{{ #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
@@@ -762,3 -761,44 +762,44 @@@ set g_balance_arc_weaponstart 
  set g_balance_arc_weaponstartoverride -1
  set g_balance_arc_weaponthrowable 1
  // }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
diff --combined bal-wep-samual.cfg
index 98503399863a97d843873a9179f8fad09bff6c5e,c0cb54aa315ff4583432ccb1b1d0f39e2d2293e8..9fde147a6ed24ff7534642ee1d5fda84fcce4c29
@@@ -486,7 -486,6 +486,7 @@@ set g_balance_porto_weaponthrowable 
  // {{{ #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
@@@ -760,3 -759,44 +760,44 @@@ set g_balance_shotgun_weaponstart 
  set g_balance_shotgun_weaponstartoverride -1
  set g_balance_shotgun_weaponthrowable 1
  // }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
diff --combined bal-wep-xdf.cfg
index 9f59c5e52a002fc10835213366087ae5ce4b06d7,f65891c9f743eaf99f4fa1ec960c534d3e6f9672..ce00717c4e3e717fe59199bd17e31f0e235e8b61
@@@ -433,7 -433,6 +433,7 @@@ set g_balance_porto_weaponthrowable 
  // {{{ #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
@@@ -762,3 -761,44 +762,44 @@@ set g_balance_arc_weaponstart 
  set g_balance_arc_weaponstartoverride -1
  set g_balance_arc_weaponthrowable 1
  // }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
diff --combined bal-wep-xonotic.cfg
index dc82b8b662282ca60703087f913ad95f91f777db,2e6d10e7b1d62b34202c7388d5c74979f0b051ad..125f7cf5744c0a6348b73c41ec2ce697b0bcb81e
@@@ -433,7 -433,6 +433,7 @@@ set g_balance_porto_weaponthrowable 
  // {{{ #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
@@@ -762,3 -761,44 +762,44 @@@ set g_balance_arc_weaponstart 
  set g_balance_arc_weaponstartoverride -1
  set g_balance_arc_weaponthrowable 1
  // }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
diff --combined bal-wep-xpm.cfg
index dc82b8b662282ca60703087f913ad95f91f777db,2e6d10e7b1d62b34202c7388d5c74979f0b051ad..125f7cf5744c0a6348b73c41ec2ce697b0bcb81e
@@@ -433,7 -433,6 +433,7 @@@ set g_balance_porto_weaponthrowable 
  // {{{ #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
@@@ -762,3 -761,44 +762,44 @@@ set g_balance_arc_weaponstart 
  set g_balance_arc_weaponstartoverride -1
  set g_balance_arc_weaponthrowable 1
  // }}}
+ // {{{ #21: Heavy Machine Gun
+ set g_balance_hmg_ammo 1
+ set g_balance_hmg_damage 10
+ set g_balance_hmg_force 5
+ set g_balance_hmg_refire 0.05
+ set g_balance_hmg_reload_ammo 120
+ set g_balance_hmg_reload_time 1
+ set g_balance_hmg_solidpenetration 32
+ set g_balance_hmg_spread_add 0.01
+ set g_balance_hmg_spread_max 0.05
+ set g_balance_hmg_spread_min 0.02
+ set g_balance_hmg_switchdelay_drop 0.2
+ set g_balance_hmg_switchdelay_raise 0.2
+ set g_balance_hmg_weaponreplace ""
+ set g_balance_hmg_weaponstart 0
+ set g_balance_hmg_weaponstartoverride 0
+ set g_balance_hmg_weaponthrowable 0
+ // }}}
+ // {{{ #22: Rocket Propelled Chainsaw
+ set g_balance_rpc_ammo 10
+ set g_balance_rpc_animtime 1
+ set g_balance_rpc_damage 150
+ set g_balance_rpc_damage2 500
+ set g_balance_rpc_damageforcescale 2
+ set g_balance_rpc_edgedamage 50
+ set g_balance_rpc_force 400
+ set g_balance_rpc_health 25
+ set g_balance_rpc_lifetime 30
+ set g_balance_rpc_radius 300
+ set g_balance_rpc_refire 1
+ set g_balance_rpc_reload_ammo 10
+ set g_balance_rpc_reload_time 1
+ set g_balance_rpc_speed 1250
+ set g_balance_rpc_speedaccel 5000
+ set g_balance_rpc_switchdelay_drop 0.2
+ set g_balance_rpc_switchdelay_raise 0.2
+ set g_balance_rpc_weaponreplace ""
+ set g_balance_rpc_weaponstart 0
+ set g_balance_rpc_weaponstartoverride 0
+ set g_balance_rpc_weaponthrowable 0
+ // }}}
index 72702ac630c03696e8eaa6957219993b8c739d18,d899b3db3a8f85587c1c9ab152f043b2db29f93e..f5d1a10ba410de3d8db92ae50454483d51a13a69
@@@ -91,6 -91,7 +91,7 @@@ void CopyBody(float keepvelocity
        self.nextthink = time;
        self.think = CopyBody_Think;
        // "bake" the current animation frame for clones (they don't get clientside animation)
+       animdecide_load_if_needed(self);
        animdecide_setframes(self, FALSE, frame, frame1time, frame2, frame2time);
  
        self = oldself;
@@@ -110,7 -111,7 +111,7 @@@ float player_getspecies(
  void player_setupanimsformodel()
  {
        // load animation info
-       animdecide_init(self);
+       animdecide_load_if_needed(self);
        animdecide_setstate(self, 0, FALSE);
  }
  
@@@ -173,13 -174,11 +174,11 @@@ void PlayerCorpseDamage (entity inflict
        if (take > 100)
                Violence_GibSplash_At(hitloc, force * -0.2, 3, 1, self, attacker);
  
-       if (!(self.flags & FL_GODMODE))
-       {
-               self.armorvalue = self.armorvalue - save;
-               self.health = self.health - take;
-               // pause regeneration for 5 seconds
-               self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
-       }
+       self.armorvalue = self.armorvalue - save;
+       self.health = self.health - take;
+       // pause regeneration for 5 seconds
+       self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen);
        self.dmg_save = self.dmg_save + save;//max(save - 10, 0);
        self.dmg_take = self.dmg_take + take;//max(take - 10, 0);
        self.dmg_inflictor = inflictor;
@@@ -535,7 -534,8 +534,8 @@@ void PlayerDamage (entity inflictor, en
                }
  
                // print an obituary message
-               Obituary (attacker, inflictor, self, deathtype);
+               if(self.classname != "body")
+                       Obituary (attacker, inflictor, self, deathtype);
  
          // increment frag counter for used weapon type
          float w;
                frag_attacker = attacker;
                frag_inflictor = inflictor;
                frag_target = self;
 +              frag_damage = excess;
                frag_deathtype = deathtype;
                MUTATOR_CALLHOOK(PlayerDies);
 +              excess = frag_damage;
  
                WEP_ACTION(self.weapon, WR_PLAYERDEATH);
  
  
                // player could have been miraculously resuscitated ;)
                // e.g. players in freezetag get frozen, they don't really die
-               if(self.health >= 1 || !IS_PLAYER(self))
+               if(self.health >= 1 || !(IS_PLAYER(self) || self.classname == "body"))
                        return;
  
                // when we get here, player actually dies
                self.event_damage = PlayerCorpseDamage;
                // call the corpse damage function just in case it wants to gib
                self.event_damage(inflictor, attacker, excess, deathtype, hitloc, force);
                // set up to fade out later
                SUB_SetFade (self, time + 6 + random (), 1);
+               // reset body think wrapper broken by SUB_SetFade
+               if(self.classname == "body" && self.think != CopyBody_Think) {
+                       self.CopyBody_think = self.think;
+                       self.CopyBody_nextthink = self.nextthink;
+                       self.think = CopyBody_Think;
+                       self.nextthink = time;
+               }
  
-               if(autocvar_sv_gentle > 0 || autocvar_ekg) {
+               if(autocvar_sv_gentle > 0 || autocvar_ekg || self.classname == "body") {
                        // remove corpse
+                       // clones don't run any animation code any more, so we must gib them when they die :(
                        PlayerCorpseDamage (inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, hitloc, force);
                }
  
index d79b08b0522155b243a1bf7e78cbc7b478d314de,4200b2207a9c5872def34c817b6efd3e772ae234..b15a210486abdde26793aea7239eb0dec808f2f1
@@@ -253,7 -253,7 +253,7 @@@ MUTATOR_HOOKFUNCTION(instagib_PlayerDam
                                
                                if(frag_target != frag_attacker)
                                {
-                                       if(frag_target.health > 0) { Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_INSTAGIB_SECONDARY); }
+                                       if(frag_target.health > 0) { Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE); }
                                        frag_force = '0 0 0';
                                }
                        }
@@@ -364,14 -364,6 +364,14 @@@ MUTATOR_HOOKFUNCTION(instagib_ItemCount
        return FALSE;
  }
  
 +MUTATOR_HOOKFUNCTION(instagib_PlayerDies)
 +{     
 +      if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
 +              frag_damage = 1000; // always gib if it was a vaporizer death
 +
 +      return FALSE;
 +}
 +
  MUTATOR_HOOKFUNCTION(instagib_ItemTouch)
  {
        if(self.ammo_cells)
@@@ -457,7 -449,6 +457,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);