]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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

index a89e55b1ce0b6644ddde27b59bacb7b30dbefa03,f0f789af3762ffcf1a9ebdf8e1b2697c945b9599..c7d5190e0429a55b006ff086a47998835f28fc95
@@@ -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