From: Mario Date: Tue, 25 Sep 2018 10:34:49 +0000 (+1000) Subject: Set the animation on the golem when attacking (doesn't work properly yet) X-Git-Tag: xonotic-v0.8.5~7^2~1^2~37 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4f2ab9ff88e931c7b38e6ad9ad6b36479a686f2c;p=xonotic%2Fxonotic-data.pk3dir.git Set the animation on the golem when attacking (doesn't work properly yet) --- diff --git a/qcsrc/common/monsters/monster/golem.qc b/qcsrc/common/monsters/monster/golem.qc index 825e403ca2..739e57b7bb 100644 --- a/qcsrc/common/monsters/monster/golem.qc +++ b/qcsrc/common/monsters/monster/golem.qc @@ -165,6 +165,7 @@ bool M_Golem_Attack(int attack_type, entity actor, entity targ, .entity weaponen { case MONSTER_ATTACK_MELEE: { + setanim(actor, ((random() >= 0.5) ? actor.anim_melee2 : actor.anim_melee3), false, true, true); int swing_cnt = bound(1, floor(random() * 4), 3); Monster_Delay(actor, swing_cnt, 0.5, M_Golem_Attack_Swing); actor.anim_finished = actor.attack_finished_single[0] = time + (0.5 * swing_cnt); // set this for the delay