]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_vortex.qc
Merge branch 'master' into Melanosuchus/minigames
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_vortex.qc
index 67096cb97adee20dcdd0832e9464fce9895508d6..3c0d21354de46d73af552d758ab95f81bd293f10 100644 (file)
@@ -131,7 +131,7 @@ void W_Vortex_Attack(float issecondary)
 void spawnfunc_weapon_vortex(void); // defined in t_items.qc
 
 .float vortex_chargepool_pauseregen_finished;
-float W_Vortex(float req)
+bool W_Vortex(int req)
 {
        float dt;
        float ammo_amount;
@@ -264,6 +264,11 @@ float W_Vortex(float req)
                        VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
                        return true;
                }
+               case WR_SETUP:
+               {
+                       self.vortex_lasthit = 0;
+                       return true;
+               }
                case WR_CHECKAMMO1:
                {
                        ammo_amount = self.WEP_AMMO(VORTEX) >= WEP_CVAR_PRI(vortex, ammo);
@@ -289,6 +294,11 @@ float W_Vortex(float req)
                        VORTEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
                        return true;
                }
+               case WR_RESETPLAYER:
+               {
+                       self.vortex_lasthit = 0;
+                       return true;
+               }
                case WR_RELOAD:
                {
                        W_Reload(min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), "weapons/reload.wav");
@@ -308,7 +318,7 @@ float W_Vortex(float req)
 #endif
 #ifdef CSQC
 float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO
-float W_Vortex(float req)
+bool W_Vortex(int req)
 {
        switch(req)
        {