]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/spider.qc
Merge branch 'terencehill/respawn_timer_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / spider.qc
index 9b0541c14edb581a2f342337a8511b249c56c961..b9f9bfc21c2992807c513abaf5cd0c7649720138 100644 (file)
@@ -151,14 +151,19 @@ void M_Spider_Attack_Web_Explode()
        }
 }
 
-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)
 {
@@ -168,8 +173,8 @@ 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;
@@ -181,7 +186,7 @@ void M_Spider_Attack_Web(entity this)
        //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;