]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/monster/wyvern.qc
Weapons: use bitflags for fire modes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / monster / wyvern.qc
index ac9f32205dae432e9104065d29957df55dd7debd..b3bb5bfe8eb030ed1dbf1d61333f0ad0c00614e0 100644 (file)
@@ -48,8 +48,8 @@ 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)
+METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, int fire)) {
+    if (fire & 1)
     if (time > actor.attack_finished_single || weapon_prepareattack(thiswep, actor, 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)) {
@@ -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, 1);
                        return true;
                }
        }