Merge branch 'master' into terencehill/accuracy_shotgun
authorterencehill <piuntn@gmail.com>
Sun, 18 Feb 2018 00:16:40 +0000 (01:16 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 18 Feb 2018 00:16:40 +0000 (01:16 +0100)
# Conflicts:
# qcsrc/common/weapons/weapon/hagar.qc
# qcsrc/server/player.qc
# qcsrc/server/weapons/tracing.qc

1  2 
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/server/client.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/player.qc
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/tracing.qc

@@@ -181,8 -183,7 +183,8 @@@ void W_Hagar_Attack2_Load_Release(entit
  
        weapon_prepareattack_do(actor, weaponentity, true, WEP_CVAR_SEC(hagar, refire));
  
 -      W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage), WEP_HAGAR.m_id | HITTYPE_SECONDARY);
 +      shots = actor.(weaponentity).hagar_load;
-       W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage) * shots);
++      W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage) * shots, WEP_HAGAR.m_id | HITTYPE_SECONDARY);
        Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
  
        forward = v_forward;
Simple merge
@@@ -367,10 -364,8 +364,9 @@@ const float ACTIVE_TOGGLE         = 3
  
  .float player_blocked;
  
- .float revive_progress = _STAT(REVIVE_PROGRESS);
  .float revival_time; // time at which player was last revived
  .float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
 +.float freeze_time;
  .entity iceblock;
  .entity frozen_by; // for ice fields
  
@@@ -532,9 -529,9 +529,9 @@@ void Freeze (entity targ, float revives
        float targ_maxhealth = ((IS_MONSTER(targ)) ? targ.max_health : start_health);
  
        STAT(FROZEN, targ) = frozen_type;
-       targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
+       STAT(REVIVE_PROGRESS, targ) = ((frozen_type == 3) ? 1 : 0);
        SetResourceAmount(targ, RESOURCE_HEALTH, ((frozen_type == 3) ? targ_maxhealth : 1));
 -      targ.revive_speed = freeze_time;
 +      targ.revive_speed = revivespeed;
        if(targ.bot_attack)
                IL_REMOVE(g_bot_targets, targ);
        targ.bot_attack = false;
@@@ -655,7 -652,7 +654,7 @@@ void PlayerDamage(entity this, entity i
                if(autocvar_sv_gentle > 0 || autocvar_ekg || this.classname == "body") {
                        // remove corpse
                        // clones don't run any animation code any more, so we must gib them when they die :(
-                       this.event_damage(this, inflictor, attacker, autocvar_sv_gibhealth + 1, deathtype, hitloc, force);
 -                      PlayerCorpseDamage(this, inflictor, attacker, autocvar_sv_gibhealth+1.0, deathtype, weaponentity, hitloc, force);
++                      this.event_damage(this, inflictor, attacker, autocvar_sv_gibhealth + 1, deathtype, weaponentity, hitloc, force);
                }
  
                // reset fields the weapons may use just in case
Simple merge
@@@ -422,10 -418,10 +418,10 @@@ void fireBullet(entity this, .entity we
                        yoda = 0;
                        MUTATOR_CALLHOOK(FireBullet_Hit, this, hit, start, end, damage, this.(weaponentity));
                        damage = M_ARGV(4, float);
 -                      float g = accuracy_isgooddamage(this, hit);
 +                      bool gooddamage = accuracy_isgooddamage(this, hit);
-                       Damage(hit, this, this, damage * solid_penetration_left, dtype, start, force * dir * solid_penetration_left);
+                       Damage(hit, this, this, damage * solid_penetration_left, dtype, weaponentity, start, force * dir * solid_penetration_left);
                        // calculate hits for ballistic weapons
 -                      if(g)
 +                      if(gooddamage)
                        {
                                // do not exceed 100%
                                float added_damage = min(damage - total_damage, damage * solid_penetration_left);