]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Only set z axis target if the flying monster has vertical movement enabled
authorMario <mario.mario@y7mail.com>
Sun, 1 Sep 2013 17:51:47 +0000 (03:51 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 1 Sep 2013 17:51:47 +0000 (03:51 +1000)
qcsrc/common/monsters/sv_monsters.qc

index c28bb39564209714a1a7ce37e7c823987504ee6c..a81fe64b2704396d989494c65c95d23e8ff02c82 100644 (file)
@@ -420,11 +420,12 @@ vector monster_pickmovetarget(entity targ)
                        self.monster_movestate = MONSTER_MOVE_WANDER;
                        self.last_trace = time + 2;
                                
-                       self.angles_y = random() * 500;
+                       self.angles_y = rint(random() * 500);
                        makevectors(self.angles);
                        pos = self.origin + v_forward * 600;
                        
                        if(self.flags & FL_FLY || self.flags & FL_SWIM)
+                       if(self.spawnflags & MONSTERFLAG_FLY_VERTICAL)
                        {
                                pos_z = random() * 200;
                                if(random() >= 0.5)