]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/wyvern.qc
Merge branch 'master' into TimePath/items
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / wyvern.qc
index 956d2910f6925db826d750f05f77b3c303deb47c..315e8d66efde5d671b1db69ccda9194686041491 100644 (file)
@@ -48,12 +48,12 @@ float autocvar_g_monster_wyvern_attack_fireball_speed;
 void M_Wyvern_Attack_Fireball_Explode();
 void M_Wyvern_Attack_Fireball_Touch();
 
-METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, bool fire1, bool fire2)) {
-    if (fire1)
-    if (time > actor.attack_finished_single || weapon_prepareattack(thiswep, actor, false, 1.2)) {
+METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, int slot, int fire)) {
+    if (fire & 1)
+    if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, slot, false, 1.2)) {
         if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
                if (IS_MONSTER(actor)) {
-                       actor.attack_finished_single = time + 1.2;
+                       actor.attack_finished_single[0] = time + 1.2;
                        actor.anim_finished = time + 1.2;
                        monster_makevectors(actor.enemy);
                }
@@ -73,7 +73,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, bool fir
                missile.touch = M_Wyvern_Attack_Fireball_Touch;
                CSQCProjectile(missile, true, PROJECTILE_FIREMINE, true);
 
-        weapon_thinkf(actor, WFRAME_FIRE1, 0, w_ready);
+        weapon_thinkf(actor, slot, WFRAME_FIRE1, 0, w_ready);
     }
 }
 
@@ -128,7 +128,7 @@ float M_Wyvern_Attack(float attack_type, entity targ)
                {
                        w_shotdir = normalize((self.enemy.origin + '0 0 10') - self.origin);
                        Weapon wep = WEP_WYVERN_ATTACK;
-                       wep.wr_think(wep, self, true, false);
+                       wep.wr_think(wep, self, 0, 1);
                        return true;
                }
        }