From: bones_was_here <bones_was_here@xonotic.au>
Date: Fri, 15 Sep 2023 17:15:12 +0000 (+1000)
Subject: Fix sticky electro orbs and mines being unhittable on DP master
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f3cb6bcbccd14720ba46888c078bc69107390c50;p=xonotic%2Fxonotic-data.pk3dir.git

Fix sticky electro orbs and mines being unhittable on DP master

The moving projectiles are configured correctly but when they touch a
surface they're deleted and replaced with a sticky projectile.
Those weren't configured to be hittable directly, and weren't linked to
the area grid so findradius couldn't find them for splash damage.
---

diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc
index 2c03871ce5..280267a9ad 100644
--- a/qcsrc/common/weapons/weapon/electro.qc
+++ b/qcsrc/common/weapons/weapon/electro.qc
@@ -305,6 +305,7 @@ void W_Electro_Orb_Stick(entity this, entity to)
 
 	newproj.owner = this.owner;
 	newproj.realowner = this.realowner;
+	PROJECTILE_MAKETRIGGER(newproj);
 	setorigin(newproj, this.origin);
 	setmodel(newproj, MDL_PROJECTILE_ELECTRO);
 	setsize(newproj, this.mins, this.maxs);
diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc
index c73db2bc28..63c7b9e443 100644
--- a/qcsrc/common/weapons/weapon/minelayer.qc
+++ b/qcsrc/common/weapons/weapon/minelayer.qc
@@ -18,6 +18,7 @@ void W_MineLayer_Stick(entity this, entity to)
 
 	newmine.owner = this.owner;
 	newmine.realowner = this.realowner;
+	PROJECTILE_MAKETRIGGER(newmine);
 	setorigin(newmine, this.origin);
 	setmodel(newmine, MDL_MINELAYER_MINE);
 	setsize(newmine, '-4 -4 -4', '4 4 4');