]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Spider
authorMario <mario@smbclan.net>
Mon, 9 Jan 2017 10:56:52 +0000 (20:56 +1000)
committerMario <mario@smbclan.net>
Mon, 9 Jan 2017 10:56:52 +0000 (20:56 +1000)
qcsrc/common/monsters/monster/spider.qc

index f3358da9445f3425723d28b111240abe8b851db0..fb3334d2f67b398e6390857c926bf3ffc811b9f1 100644 (file)
@@ -203,14 +203,15 @@ METHOD(Spider, mr_think, bool(Spider this, entity actor))
 METHOD(Spider, mr_pain, float(Spider this, entity actor, float damage_take, entity attacker, float deathtype))
 {
     TC(Spider, this);
+    setanim(actor, ((random() > 0.5) ? actor.anim_pain2 : actor.anim_pain1), true, true, false);
+    actor.pain_finished = actor.animstate_endtime;
     return damage_take;
 }
 
 METHOD(Spider, mr_death, bool(Spider this, entity actor))
 {
     TC(Spider, this);
-    setanim(actor, actor.anim_melee, false, true, true);
-    actor.angles_x = 180;
+    setanim(actor, ((random() > 0.5) ? actor.anim_die2 : actor.anim_die1), false, true, true);
     return true;
 }
 #endif
@@ -221,7 +222,7 @@ METHOD(Spider, mr_anim, bool(Spider this, entity actor))
     vector none = '0 0 0';
     actor.anim_melee = animfixfps(actor, '0 1 5', none); // analyze models and set framerate
     actor.anim_die1 = animfixfps(actor, '1 1 1', none);
-    actor.anim_die1 = animfixfps(actor, '2 1 1', none);
+    actor.anim_die2 = animfixfps(actor, '2 1 1', none);
     actor.anim_shoot = animfixfps(actor, '3 1 1', none);
     //actor.anim_fire2 = animfixfps(actor, '4 1 1', none);
     actor.anim_idle = animfixfps(actor, '5 1 1', none);