]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Set the animation on the golem when attacking (doesn't work properly yet)
authorMario <mario@smbclan.net>
Tue, 25 Sep 2018 10:34:49 +0000 (20:34 +1000)
committerMario <mario@smbclan.net>
Tue, 25 Sep 2018 10:34:49 +0000 (20:34 +1000)
qcsrc/common/monsters/monster/golem.qc

index 825e403ca26adb9f5c8c3dd8e671d6cefd279818..739e57b7bb28cc9d4acc3ab3e03c3dce76e1dfd8 100644 (file)
@@ -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