]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/vaporizer.qc
Merge branch 'terencehill/menu_languages' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / vaporizer.qc
index 6830c90016fa0acd5021af517e1a7702e8242111..5a6082134c58134d5df4b97889d029405f0b9772 100644 (file)
@@ -108,7 +108,7 @@ void W_Vaporizer_Attack(Weapon thiswep)
        W_DecreaseAmmo(thiswep, self, ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo)));
 }
 
-void W_RocketMinsta_Laser_Explode (void)
+void W_RocketMinsta_Laser_Explode ()
 {SELFPARAM();
        if(other.takedamage == DAMAGE_AIM)
                if(IS_PLAYER(other))
@@ -123,7 +123,7 @@ void W_RocketMinsta_Laser_Explode (void)
        remove(self);
 }
 
-void W_RocketMinsta_Laser_Touch (void)
+void W_RocketMinsta_Laser_Touch ()
 {SELFPARAM();
        PROJECTILE_TOUCH;
        //W_RocketMinsta_Laser_Explode ();
@@ -131,7 +131,7 @@ void W_RocketMinsta_Laser_Touch (void)
        remove(self);
 }
 
-void W_RocketMinsta_Attack2(void)
+void W_RocketMinsta_Attack2()
 {SELFPARAM();
        makevectors(self.v_angle);
 
@@ -150,8 +150,7 @@ void W_RocketMinsta_Attack2(void)
 
     while(counter < total)
        {
-        proj = spawn ();
-        proj.classname = "plasma_prim";
+        proj = new(plasma_prim);
         proj.owner = proj.realowner = self;
         proj.bot_dodge = true;
         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
@@ -186,7 +185,7 @@ void W_RocketMinsta_Attack2(void)
     }
 }
 
-void W_RocketMinsta_Attack3 (void)
+void W_RocketMinsta_Attack3 ()
 {SELFPARAM();
        makevectors(self.v_angle);
 
@@ -203,8 +202,7 @@ void W_RocketMinsta_Attack3 (void)
 
     while(counter < total)
        {
-        proj = spawn ();
-        proj.classname = "plasma_prim";
+        proj = new(plasma_prim);
         proj.owner = proj.realowner = self;
         proj.bot_dodge = true;
         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
@@ -244,7 +242,7 @@ void W_RocketMinsta_Attack3 (void)
                        else
                                self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), false); // WEAPONTODO: replace with proper vaporizer cvars
                }
-               METHOD(Vaporizer, wr_think, void(entity thiswep, entity actor, int slot, int fire))
+               METHOD(Vaporizer, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
                {
                        float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
                        // if the laser uses load, we also consider its ammo for reloading
@@ -257,10 +255,10 @@ void W_RocketMinsta_Attack3 (void)
                        }
                        if((fire & 1) && (actor.ammo_cells || !autocvar_g_rm) && !forbidWeaponUse(actor))
                        {
-                               if(weapon_prepareattack(thiswep, actor, slot, false, WEP_CVAR_PRI(vaporizer, refire)))
+                               if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(vaporizer, refire)))
                                {
                                        W_Vaporizer_Attack(thiswep);
-                                       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(vaporizer, animtime), w_ready);
+                                       weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(vaporizer, animtime), w_ready);
                                }
                        }
                        if((fire & 2) || ((fire & 1) && !actor.ammo_cells && autocvar_g_rm))
@@ -314,7 +312,7 @@ void W_RocketMinsta_Attack3 (void)
                                        actor.weapon = oldwep;
 
                                        // now do normal refire
-                                       weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);
+                                       weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);
                                }
                        }
                        else