]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't update monster angles if it's attacking
authorMario <mario.mario@y7mail.com>
Sun, 2 Jun 2013 10:55:00 +0000 (20:55 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 2 Jun 2013 10:55:00 +0000 (20:55 +1000)
qcsrc/server/monsters/lib/monsters.qc
qcsrc/server/monsters/monster/shambler.qc

index 122b0de274bb25aa866c0ac866a2ca5ce0636710..d0aefc905d9811fbfea6b6b586d3da36b47c88d0 100644 (file)
@@ -601,7 +601,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
        if(!(self.flags & FL_FLY || self.flags & FL_SWIM))
                self.moveto_z = self.origin_z;
        
-       if(self.state != MONSTER_STATE_ATTACK_LEAP)
+       if(self.state != MONSTER_STATE_ATTACK_LEAP && self.state != MONSTER_STATE_ATTACK_MELEE)
                self.angles_y = angles_face_y;
        
        if(self.state == MONSTER_STATE_ATTACK_LEAP && (self.flags & FL_ONGROUND))
@@ -644,6 +644,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                        if (vlen(self.velocity) <= 30)
                        {
                                monsters_setframe(manim_idle);
+                               if(self.state != MONSTER_STATE_ATTACK_MELEE)
                                if(self.enemy)
                                        self.angles_y = enemy_face_y;
                                else
index 7e4433ca1a045af94bff318e0b6e7619ec45f78c..15d4d14db865f64eb274dd0902bff3bc9416c73d 100644 (file)
@@ -70,7 +70,7 @@ void CastLightning ()
        self.monster_delayedattack = func_null;
        self.delay = -1;
 
-       local vector org = '0 0 0', dir = '0 0 0';
+       local vector org, dir;
        //vector v = '0 0 0';
 
        self.effects |= EF_MUZZLEFLASH;