Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Sat, 24 Dec 2016 05:09:44 +0000 (15:09 +1000)
committerMario <mario@smbclan.net>
Sat, 24 Dec 2016 05:09:44 +0000 (15:09 +1000)
# Conflicts:
# qcsrc/common/monsters/sv_monsters.qc

1  2 
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/stats.qh

@@@ -412,18 -409,16 +409,18 @@@ bool Monster_Attack_Leap(entity this, v
        return true;
  }
  
 -void Monster_Attack_Check(entity this, entity targ)
 +void Monster_Attack_Check(entity this, entity targ, .entity weaponentity)
  {
-       if((this == NULL || targ == NULL)
 +      int slot = weaponslot(weaponentity);
 +
+       if((!this || !targ)
        || (!this.monster_attackfunc)
 -      || (time < this.attack_finished_single[0])
 +      || (time < this.attack_finished_single[slot])
        ) { return; }
  
        if(vdist(targ.origin - this.origin, <=, this.attack_range))
        {
-               bool attack_success = this.monster_attackfunc(MONSTER_ATTACK_MELEE, this, targ, weaponentity);
 -              int attack_success = this.monster_attackfunc(MONSTER_ATTACK_MELEE, this, targ);
++              int attack_success = this.monster_attackfunc(MONSTER_ATTACK_MELEE, this, targ, weaponentity);
                if(attack_success == 1)
                        Monster_Sound(this, monstersound_melee, 0, false, CH_VOICE);
                else if(attack_success > 0)
  
        if(vdist(targ.origin - this.origin, >, this.attack_range))
        {
-               float attack_success = this.monster_attackfunc(MONSTER_ATTACK_RANGED, this, targ, weaponentity);
 -              int attack_success = this.monster_attackfunc(MONSTER_ATTACK_RANGED, this, targ);
++              int attack_success = this.monster_attackfunc(MONSTER_ATTACK_RANGED, this, targ, weaponentity);
                if(attack_success == 1)
                        Monster_Sound(this, monstersound_melee, 0, false, CH_VOICE);
                else if(attack_success > 0)
Simple merge