]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hook.qc
Merge branch 'Mario/qc_physics_cleanup_v2'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hook.qc
index 5963b3bc7db84b7d86b4c0a4473f096df8a78e0c..8926ffa306ea0bd5bbfbe68438deed9481b460f4 100644 (file)
@@ -115,7 +115,7 @@ void W_Hook_Explode2(entity this)
        this.dmg_duration = WEP_CVAR_SEC(hook, duration);
        this.teleport_time = time;
        this.dmg_last = 1;
-       this.movetype = MOVETYPE_NONE;
+       set_movetype(this, MOVETYPE_NONE);
 }
 
 void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
@@ -137,9 +137,9 @@ void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage,
                W_PrepareExplosionByDamage(this, this.realowner, W_Hook_Explode2);
 }
 
-void W_Hook_Touch2(entity this)
+void W_Hook_Touch2(entity this, entity toucher)
 {
-       PROJECTILE_TOUCH(this);
+       PROJECTILE_TOUCH(this, toucher);
        this.use(this, NULL, NULL);
 }
 
@@ -152,7 +152,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
        gren.owner = gren.realowner = actor;
        gren.bot_dodge = true;
        gren.bot_dodgerating = WEP_CVAR_SEC(hook, damage);
-       gren.movetype = MOVETYPE_TOSS;
+       set_movetype(gren, MOVETYPE_TOSS);
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = WEP_HOOK.m_id | HITTYPE_SECONDARY;
        setorigin(gren, w_shotorg);
@@ -441,6 +441,10 @@ void Draw_GrapplingHook(entity this)
                        break;
        }
 
+       MUTATOR_CALLHOOK(DrawGrapplingHook, this, tex, rgb, t);
+       tex = M_ARGV(1, string);
+       rgb = M_ARGV(2, vector);
+
        Draw_GrapplingHook_trace_callback_tex = tex;
        Draw_GrapplingHook_trace_callback_rnd = offset;
        Draw_GrapplingHook_trace_callback_rgb = rgb;