X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fmage.qc;h=1ba4e1efbcdf072fa89a70e4ca23f7e159ac4034;hb=78a7f4e2e32cc06b3ba5cb63672ffbec8cb06087;hp=de2a99e2e001aaa7bb67555187203967c6bfeb2d;hpb=7f042267d93f57719b68f0725af14d444f5c8932;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index de2a99e2e..1ba4e1efb 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -219,14 +219,14 @@ void M_Mage_Defend_Heal(entity this) FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_mage_heal_range, M_Mage_Defend_Heal_Check(this, it), { washealed = true; - string fx = ""; + entity fx = EFFECT_Null; if(IS_PLAYER(it)) { switch(this.skin) { case 0: if(it.health < autocvar_g_balance_health_regenstable) it.health = bound(0, it.health + (autocvar_g_monster_mage_heal_allies), autocvar_g_balance_health_regenstable); - fx = EFFECT_HEALING.eent_eff_name; + fx = EFFECT_HEALING; break; case 1: if(it.ammo_cells) it.ammo_cells = bound(it.ammo_cells, it.ammo_cells + 1, g_pickup_cells_max); @@ -234,22 +234,22 @@ void M_Mage_Defend_Heal(entity this) if(it.ammo_rockets) it.ammo_rockets = bound(it.ammo_rockets, it.ammo_rockets + 1, g_pickup_rockets_max); if(it.ammo_shells) it.ammo_shells = bound(it.ammo_shells, it.ammo_shells + 2, g_pickup_shells_max); if(it.ammo_nails) it.ammo_nails = bound(it.ammo_nails, it.ammo_nails + 5, g_pickup_nails_max); - fx = "ammoregen_fx"; + fx = EFFECT_AMMO_REGEN; break; case 2: if(it.armorvalue < autocvar_g_balance_armor_regenstable) { it.armorvalue = bound(0, it.armorvalue + (autocvar_g_monster_mage_heal_allies), autocvar_g_balance_armor_regenstable); - fx = "armorrepair_fx"; + fx = EFFECT_ARMOR_REPAIR; } break; case 3: it.health = bound(0, it.health - ((it == this) ? (autocvar_g_monster_mage_heal_self) : (autocvar_g_monster_mage_heal_allies)), autocvar_g_balance_health_regenstable); - fx = EFFECT_RAGE.eent_eff_name; + fx = EFFECT_RAGE; break; } - Send_Effect_(fx, it.origin, '0 0 0', 1); + Send_Effect(fx, it.origin, '0 0 0', 1); } else { @@ -264,6 +264,7 @@ void M_Mage_Defend_Heal(entity this) { setanim(this, this.anim_shoot, true, true, true); this.attack_finished_single[0] = time + (autocvar_g_monster_mage_heal_delay); + this.state = MONSTER_ATTACK_MELEE; this.anim_finished = time + 1.5; } } @@ -439,18 +440,25 @@ METHOD(Mage, mr_anim, bool(Mage this, entity actor)) { TC(Mage, this); vector none = '0 0 0'; - actor.anim_die1 = animfixfps(actor, '4 1 0.5', none); // 2 seconds - actor.anim_walk = animfixfps(actor, '1 1 1', none); actor.anim_idle = animfixfps(actor, '0 1 1', none); - actor.anim_pain1 = animfixfps(actor, '3 1 2', none); // 0.5 seconds + actor.anim_walk = animfixfps(actor, '1 1 1', none); + actor.anim_run = animfixfps(actor, '1 1 1', none); actor.anim_shoot = animfixfps(actor, '2 1 5', none); // analyze models and set framerate - actor.anim_run = animfixfps(actor, '5 1 1', none); + //actor.anim_fire1 = animfixfps(actor, '3 1 5', none); // analyze models and set framerate + //actor.anim_fire2 = animfixfps(actor, '4 1 5', none); // analyze models and set framerate + //actor.anim_fire3 = animfixfps(actor, '5 1 5', none); // analyze models and set framerate + actor.anim_pain1 = animfixfps(actor, '6 1 2', none); // 0.5 seconds + actor.anim_pain2 = animfixfps(actor, '7 1 2', none); // 0.5 seconds + //actor.anim_pain3 = animfixfps(actor, '8 1 2', none); // 0.5 seconds + actor.anim_die1 = animfixfps(actor, '9 1 0.5', none); // 2 seconds + actor.anim_die2 = animfixfps(actor, '10 1 0.5', none); // 2 seconds + //actor.anim_dead1 = animfixfps(actor, '11 1 0.5', none); // 2 seconds + //actor.anim_dead2 = animfixfps(actor, '12 1 0.5', none); // 2 seconds return true; } #endif #ifdef SVQC .float speed; -spawnfunc(item_health_large); METHOD(Mage, mr_setup, bool(Mage this, entity actor)) { TC(Mage, this); @@ -460,15 +468,9 @@ METHOD(Mage, mr_setup, bool(Mage this, entity actor)) if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_mage_speed_stop); } if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_mage_damageforcescale); } - actor.monster_loot = spawnfunc_item_health_large; + actor.monster_loot = ITEM_HealthBig; actor.monster_attackfunc = M_Mage_Attack; return true; } - -METHOD(Mage, mr_precache, bool(Mage this)) -{ - TC(Mage, this); - return true; -} #endif