MUTATOR_HOOKFUNCTION(spiderweb, PlayerPhysics)
{
- if (time >= self.spider_slowness)
+ SELFPARAM();
+ if (time >= this.spider_slowness)
return false;
- PHYS_MAXSPEED(self) *= 0.5; // half speed while slow from spider
- PHYS_MAXAIRSPEED(self) *= 0.5;
- PHYS_AIRSPEEDLIMIT_NONQW(self) *= 0.5;
- PHYS_AIRSTRAFEACCELERATE(self) *= 0.5;
+ PHYS_MAXSPEED(this) *= 0.5; // half speed while slow from spider
+ PHYS_MAXAIRSPEED(this) *= 0.5;
+ PHYS_AIRSPEEDLIMIT_NONQW(this) *= 0.5;
+ PHYS_AIRSTRAFEACCELERATE(this) *= 0.5;
return false;
}
MUTATOR_HOOKFUNCTION(spiderweb, MonsterMove)
{
+ SELFPARAM();
if(time < self.spider_slowness)
{
monster_speed_run *= 0.5;
MUTATOR_HOOKFUNCTION(spiderweb, PlayerSpawn)
{
+ SELFPARAM();
self.spider_slowness = 0;
return false;
}
MUTATOR_HOOKFUNCTION(spiderweb, MonsterSpawn)
{
+ SELFPARAM();
self.spider_slowness = 0;
return false;
}
SOUND(SpiderAttack_FIRE, W_Sound("electro_fire"));
METHOD(SpiderAttack, wr_think, void(SpiderAttack thiswep, entity actor, .entity weaponentity, int fire))
{
+ SELFPARAM();
TC(SpiderAttack, thiswep);
bool isPlayer = IS_PLAYER(actor);
if (fire & 1)
}
}
-void M_Spider_Attack_Web_Touch()
+void M_Spider_Attack_Web_Explode_use(entity this, entity actor, entity trigger)
{
- PROJECTILE_TOUCH;
+ WITHSELF(this, M_Spider_Attack_Web_Explode());
+}
+
+void M_Spider_Attack_Web_Touch(entity this)
+{
+ PROJECTILE_TOUCH(this);
M_Spider_Attack_Web_Explode();
}
-void adaptor_think2use_hittype_splash();
+void adaptor_think2use_hittype_splash(entity this);
void M_Spider_Attack_Web(entity this)
{
entity proj = new(plasma);
proj.owner = proj.realowner = this;
- proj.use = M_Spider_Attack_Web_Explode;
- proj.think = adaptor_think2use_hittype_splash;
+ proj.use = M_Spider_Attack_Web_Explode_use;
+ setthink(proj, adaptor_think2use_hittype_splash);
proj.bot_dodge = true;
proj.bot_dodgerating = 0;
proj.nextthink = time + 5;
//proj.glow_color = 45;
proj.movetype = MOVETYPE_BOUNCE;
W_SetupProjVelocity_Explicit(proj, v_forward, v_up, (autocvar_g_monster_spider_attack_web_speed), (autocvar_g_monster_spider_attack_web_speed_up), 0, 0, false);
- proj.touch = M_Spider_Attack_Web_Touch;
+ settouch(proj, M_Spider_Attack_Web_Touch);
setsize(proj, '-4 -4 -4', '4 4 4');
proj.takedamage = DAMAGE_NO;
proj.damageforcescale = 0;