]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/spider.qc
Update spider's web attack to use the highspeed stat instead of maxspeed/airspeed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / spider.qc
index 7ec7f95acb3ba9e17bb128dab4d41921bff18b69..3a22b360d3ff89ba71d207b2c02b01f88fa1a4f1 100644 (file)
@@ -18,16 +18,12 @@ void M_Spider_Attack_Web(entity this);
 
 REGISTER_MUTATOR(spiderweb, true);
 
-MUTATOR_HOOKFUNCTION(spiderweb, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(spiderweb, PlayerPhysics_UpdateStats)
 {
-    entity player = M_ARGV(0, entity);
+       entity player = M_ARGV(0, entity);
 
-       if (time >= player.spider_slowness)
-               return false;
-       PHYS_MAXSPEED(player) *= 0.5; // half speed while slow from spider
-       PHYS_MAXAIRSPEED(player) *= 0.5;
-       PHYS_AIRSPEEDLIMIT_NONQW(player) *= 0.5;
-       PHYS_AIRSTRAFEACCELERATE(player) *= 0.5;
+       if(time < player.spider_slowness)
+               STAT(MOVEVARS_HIGHSPEED, player) *= 0.5;
 }
 
 MUTATOR_HOOKFUNCTION(spiderweb, MonsterMove)