]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/turret/flac_weapon.qc
Weapons: add a second .weaponentity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / turret / flac_weapon.qc
index 5c602e70e4a159a0acbf01a044dcf213e96fa278..32547d6672cd530ce1ec4c9036abcd6d6208e340 100644 (file)
@@ -19,7 +19,7 @@ void turret_flac_projectile_think_explode();
 METHOD(FlacAttack, wr_think, void(entity thiswep, entity actor, int slot, int fire)) {
     bool isPlayer = IS_PLAYER(actor);
     if (fire & 1)
-    if (!isPlayer || weapon_prepareattack(thiswep, actor, false, WEP_CVAR_PRI(electro, refire))) {
+    if (!isPlayer || weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR_PRI(electro, refire))) {
         if (isPlayer) {
             turret_initparams(actor);
             W_SetupShot_Dir(actor, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
@@ -27,7 +27,7 @@ METHOD(FlacAttack, wr_think, void(entity thiswep, entity actor, int slot, int fi
             actor.tur_shotorg = w_shotorg;
             actor.tur_head = actor;
             actor.tur_impacttime = 10;
-            weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
+            weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
         }
 
         turret_tag_fire_update();