]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret.qh
Weapons: pass weaponentity field instead of slot
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret.qh
index ab8ee0111589064d37cf8159615e0d3703832ec9..dcb641404a2e869e6e05cc2c7a4e903aa809dc1a 100644 (file)
@@ -43,11 +43,14 @@ CLASS(Turret, Object)
 
     }
     ATTRIB(Turret, m_weapon, Weapon, WEP_Null)
+#ifdef SVQC
     /** (SERVER) called when turret attacks */
     METHOD(Turret, tr_attack, void(Turret this)) {
         Weapon w = this.m_weapon;
-        w.wr_think(w, self, 0, 1);
+        .entity weaponentity = weaponentities[0];
+        w.wr_think(w, self, weaponentity, 1);
     }
+#endif
     /** (ALL) */
     METHOD(Turret, tr_config, void(Turret this)) {
         // TODO