]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/monsters_broken
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 29 Aug 2015 12:26:05 +0000 (22:26 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 29 Aug 2015 12:26:05 +0000 (22:26 +1000)
# Conflicts:
# qcsrc/common/monsters/sv_monsters.qc

1  2 
qcsrc/client/csqcmodel_hooks.qc
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/server/command/sv_cmd.qc

Simple merge
index d586321f6c45735cd8c9ad13741fc346c41fd2d6,46ce94dd7e261d6f7781fd85b89afeead17a849f..8f92d693a6e614fbf2422f36722a8484b84d9b06
@@@ -241,9 -236,9 +241,9 @@@ void M_Mage_Defend_Heal(
                }
                else
                {
-                       Send_Effect("healing_fx", head.origin, '0 0 0', 1);
+                       Send_Effect(EFFECT_HEALING, head.origin, '0 0 0', 1);
                        head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), head.max_health);
 -                      if(!(head.spawnflags & MONSTERFLAG_INVINCIBLE))
 +                      if(!(head.spawnflags & MONSTERFLAG_INVINCIBLE) && head.sprite)
                                WaypointSprite_UpdateHealth(head.sprite, head.health);
                }
        }
@@@ -260,9 -254,9 +260,9 @@@ void M_Mage_Attack_Push(
  {
        sound(self, CH_SHOTS, W_Sound("tagexp1"), 1, ATTEN_NORM);
        RadiusDamage (self, self, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE, self.enemy);
-       Send_Effect("TE_EXPLOSION", self.origin, '0 0 0', 1);
+       Send_Effect(EFFECT_TE_EXPLOSION, self.origin, '0 0 0', 1);
  
 -      self.frame = mage_anim_attack;
 +      setanim(self, self.anim_shoot, true, true, true);
        self.attack_finished_single = time + (autocvar_g_monster_mage_attack_push_delay);
  }
  
index 49bc3d8e690098a37e701b7dbc4f9595d5c120f0,80325a2fa511c1ea9c4e853bb22bce493d91275d..4640fe945bcf33f6e9ea8744bdf0d79303334d2f
@@@ -46,28 -40,26 +46,28 @@@ const float shambler_anim_death            = 8
  
  .float shambler_lastattack; // delay attacks separately
  
 -void shambler_smash()
 +void M_Shambler_Attack_Smash()
  {
        makevectors(self.angles);
-       Send_Effect("explosion_medium", (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
+       Send_Effect(EFFECT_EXPLOSION_MEDIUM, (self.origin + (v_forward * 150)) - ('0 0 1' * self.maxs.z), '0 0 0', 1);
        sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
  
 -      tracebox(self.origin + v_forward * 50, self.mins * 0.5, self.maxs * 0.5, self.origin + v_forward * 500, MOVE_NORMAL, self);
 +      // RadiusDamage does NOT support custom starting location, which means we must use this hack...
 +
 +      tracebox(self.origin + v_forward * 50, self.mins * 0.5, self.maxs * 0.5, self.origin + v_forward * autocvar_g_monster_shambler_attack_smash_range, MOVE_NORMAL, self);
  
        if(trace_ent.takedamage)
 -              Damage(trace_ent, self, self, (autocvar_g_monster_shambler_attack_smash_damage) * Monster_SkillModifier(), DEATH_MONSTER_SHAMBLER_SMASH, trace_ent.origin, normalize(trace_ent.origin - self.origin));
 +              Damage(trace_ent, self, self, (autocvar_g_monster_shambler_attack_smash_damage) * MONSTER_SKILLMOD(self), DEATH_MONSTER_SHAMBLER_SMASH, trace_ent.origin, normalize(trace_ent.origin - self.origin));
  }
  
 -void shambler_swing()
 +void M_Shambler_Attack_Swing()
  {
        float r = (random() < 0.5);
 -      monster_melee(self.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((r) ? shambler_anim_swingr : shambler_anim_swingl), self.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW, true);
 -      if(r)
 +      if(r && Monster_Attack_Melee(self.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((r) ? self.anim_melee2 : self.anim_melee3), self.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW, true))
        {
 -              defer(0.5, shambler_swing);
 +              Monster_Delay(1, 0, 0.5, M_Shambler_Attack_Swing);
                self.attack_finished_single += 0.5;
 +              self.anim_finished = self.attack_finished_single;
        }
  }
  
index c977aa67e121e8afe284a7544fb593f0307cf5be,9f8028aa8fe0204db44ed11d3446fb8cd6bcb541..e7ea9f8c48520182793b32e30a25a6457e6e1774
@@@ -907,19 -835,24 +907,19 @@@ void Monster_Move(float runspeed, floa
                self.angles_y += turny;
        }
  
 -      monster_checkattack(self, self.enemy);
 +      Monster_Attack_Check(self, self.enemy);
  }
  
 -void monster_remove(entity mon)
 +void Monster_Remove(entity mon)
  {
 -      if(!mon)
 -              return; // nothing to remove
 -
 -      Send_Effect(EFFECT_ITEM_PICKUP, mon.origin, '0 0 0', 1);
 +      if(!mon) { return; }
  
 -      if(mon.weaponentity)
 -              remove(mon.weaponentity);
 -
 -      if(mon.iceblock)
 -              remove(mon.iceblock);
 +      if(!MUTATOR_CALLHOOK(MonsterRemove, mon))
-               Send_Effect("item_pickup", mon.origin, '0 0 0', 1);
++              Send_Effect(EFFECT_ITEM_PICKUP, mon.origin, '0 0 0', 1);
  
 +      if(mon.weaponentity) { remove(mon.weaponentity); }
 +      if(mon.iceblock) { remove(mon.iceblock); }
        WaypointSprite_Kill(mon.sprite);
 -
        remove(mon);
  }
  
Simple merge