]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Also apply slowness to monsters
authorMario <mario.mario@y7mail.com>
Sat, 12 Oct 2013 23:13:13 +0000 (10:13 +1100)
committerMario <mario.mario@y7mail.com>
Sat, 12 Oct 2013 23:13:13 +0000 (10:13 +1100)
qcsrc/common/monsters/sv_monsters.qc

index bad048dcc191c729a9d8766cb7b11f2ea6bb05fc..32b0c02ed2168660c08d3856c5c1cd71b40a781c 100644 (file)
@@ -605,6 +605,12 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
        targ = monster_target;
        runspeed = bound(0, monster_speed_run * Monster_SkillModifier(), runspeed * 2); // limit maxspeed to prevent craziness
        walkspeed = bound(0, monster_speed_walk * Monster_SkillModifier(), walkspeed * 2); // limit maxspeed to prevent craziness
+       
+       if(time < self.spider_slowness)
+       {
+               runspeed *= 0.5;
+               walkspeed *= 0.5;
+       }
 
        if(teamplay)
        if(autocvar_g_monsters_teams)