]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_nexball.qc
Merge branch 'master' into Mario/mute_bot_warnings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_nexball.qc
index c115dca36c07474e75e439178c2118c16864d080..8790162afa9804ed508c48bcecb4241930ad5319 100644 (file)
@@ -425,28 +425,28 @@ void nb_spawnteams(void)
        {
                switch(e.team)
                {
-               case FL_TEAM_1:
+               case NUM_TEAM_1:
                        if(!t_r)
                        {
                                nb_spawnteam("Red", e.team-1)   ;
                                t_r = 1;
                        }
                        break;
-               case FL_TEAM_2:
+               case NUM_TEAM_2:
                        if(!t_b)
                        {
                                nb_spawnteam("Blue", e.team-1)  ;
                                t_b = 1;
                        }
                        break;
-               case FL_TEAM_3:
+               case NUM_TEAM_3:
                        if(!t_y)
                        {
                                nb_spawnteam("Yellow", e.team-1);
                                t_y = 1;
                        }
                        break;
-               case FL_TEAM_4:
+               case NUM_TEAM_4:
                        if(!t_p)
                        {
                                nb_spawnteam("Pink", e.team-1)  ;
@@ -576,22 +576,22 @@ void SpawnGoal(void)
 
 void spawnfunc_nexball_redgoal(void)
 {
-       self.team = FL_TEAM_1;
+       self.team = NUM_TEAM_1;
        SpawnGoal();
 }
 void spawnfunc_nexball_bluegoal(void)
 {
-       self.team = FL_TEAM_2;
+       self.team = NUM_TEAM_2;
        SpawnGoal();
 }
 void spawnfunc_nexball_yellowgoal(void)
 {
-       self.team = FL_TEAM_3;
+       self.team = NUM_TEAM_3;
        SpawnGoal();
 }
 void spawnfunc_nexball_pinkgoal(void)
 {
-       self.team = FL_TEAM_4;
+       self.team = NUM_TEAM_4;
        SpawnGoal();
 }
 
@@ -774,14 +774,13 @@ void W_Nexball_Attack2(void)
        missile.flags = FL_PROJECTILE;
 }
 
-var const float() nullfunc;
 float ball_customize()
 {
        if(!self.owner)
        {
                self.effects &~= EF_FLAME;
                self.scale = 1;
-               self.customizeentityforclient = nullfunc;
+               self.customizeentityforclient = func_null;
                return TRUE;
        }               
        
@@ -845,14 +844,8 @@ float w_nexball_weapon(float req)
                precache_sound("misc/typehit.wav");
        }
        else if(req == WR_SETUP)
-               weapon_setup(WEP_PORTO);
-       else if(req == WR_SUICIDEMESSAGE)
-       {
-               w_deathtypestring = "is a weirdo";
-       }
-       else if(req == WR_KILLMESSAGE)
        {
-               w_deathtypestring = "got killed by #'s black magic";
+               weapon_setup(WEP_PORTO);
        }
        // No need to check WR_CHECKAMMO* or WR_AIM, it should always return TRUE
        return TRUE;
@@ -981,5 +974,18 @@ MUTATOR_DEFINITION(gamemode_nexball)
                InitializeEntity(world, nb_delayedinit, INITPRIO_GAMETYPE);
        }
 
+       MUTATOR_ONROLLBACK_OR_REMOVE
+       {
+               // we actually cannot roll back nb_delayedinit here
+               // BUT: we don't need to! If this gets called, adding always
+               // succeeds.
+       }
+
+       MUTATOR_ONREMOVE
+       {
+               print("This is a game type and it cannot be removed at runtime.");
+               return -1;
+       }
+
        return 0;
 }