]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_nexball.qc
Merge branch 'master' into TimePath/unified_weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_nexball.qc
index 8f0ce7e4466ddcd930f7f668c514b16894a4bc3d..f65e058433ec146ec9799b5d77d672c1bb68c49b 100644 (file)
@@ -842,7 +842,7 @@ float ball_customize()
        METHOD(BallStealer, wr_think, void(BallStealer thiswep, entity actor, bool fire1, bool fire2))
        {
                if(fire1)
-                       if(weapon_prepareattack(actor, false, autocvar_g_balance_nexball_primary_refire))
+                       if(weapon_prepareattack(thiswep, actor, false, autocvar_g_balance_nexball_primary_refire))
                                if(autocvar_g_nexball_basketball_meter)
                                {
                                        if(self.ballcarried && !self.metertime)
@@ -856,7 +856,7 @@ float ball_customize()
                                        weapon_thinkf(actor, WFRAME_FIRE1, autocvar_g_balance_nexball_primary_animtime, w_ready);
                                }
                if(fire2)
-                       if(weapon_prepareattack(actor, true, autocvar_g_balance_nexball_secondary_refire))
+                       if(weapon_prepareattack(thiswep, actor, true, autocvar_g_balance_nexball_secondary_refire))
                        {
                                W_Nexball_Attack2();
                                weapon_thinkf(actor, WFRAME_FIRE2, autocvar_g_balance_nexball_secondary_animtime, w_ready);
@@ -1023,10 +1023,12 @@ MUTATOR_DEFINITION(gamemode_nexball)
                radar_showennemies = autocvar_g_nexball_radar_showallplayers;
 
                InitializeEntity(world, nb_delayedinit, INITPRIO_GAMETYPE);
+               WEP_NEXBALL.spawnflags &= ~WEP_FLAG_MUTATORBLOCKED;
        }
 
        MUTATOR_ONROLLBACK_OR_REMOVE
        {
+               WEP_NEXBALL.spawnflags |= WEP_FLAG_MUTATORBLOCKED;
                // we actually cannot roll back nb_delayedinit here
                // BUT: we don't need to! If this gets called, adding always
                // succeeds.