REGISTER_MUTATOR(spiderweb, true);
-MUTATOR_HOOKFUNCTION(spiderweb, PlayerPhysics)
+MUTATOR_HOOKFUNCTION(spiderweb, PlayerPhysics_UpdateStats)
{
- 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;
+ entity player = M_ARGV(0, entity);
+
+ if(time < player.spider_slowness)
+ STAT(MOVEVARS_HIGHSPEED, player) *= 0.5;
}
MUTATOR_HOOKFUNCTION(spiderweb, MonsterMove)
CSQCProjectile(proj, true, PROJECTILE_ELECTRO, true);
}
-bool M_Spider_Attack(int attack_type, entity actor, entity targ)
+bool M_Spider_Attack(int attack_type, entity actor, entity targ, .entity weaponentity)
{
- .entity weaponentity = weaponentities[0];
switch(attack_type)
{
Weapon wep = WEP_SPIDER_ATTACK;
}
#endif
#ifdef SVQC
-spawnfunc(item_health_medium);
METHOD(Spider, mr_setup, bool(Spider this, entity actor))
{
TC(Spider, this);
if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_spider_speed_stop); }
if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_spider_damageforcescale); }
- actor.monster_loot = spawnfunc_item_health_medium;
+ actor.monster_loot = ITEM_HealthMedium;
actor.monster_attackfunc = M_Spider_Attack;
return true;
}
-
-METHOD(Spider, mr_precache, bool(Spider this))
-{
- TC(Spider, this);
- return true;
-}
#endif