]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_nexball.qc
Merge remote-tracking branch 'origin/master' into samual/mutator_ctf
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_nexball.qc
index 9d7870acab004c0610f65c32fc9ed54ceb71a777..1b94746356c85ee15576d809f3e0ce3b57f9c076 100644 (file)
@@ -323,6 +323,8 @@ void GoalTouch(void)
 
        if(nb_teams == 2)
                otherteam = OtherTeam(ball.team);
+       else
+               otherteam = 0;
 
        if((isclient = ball.pusher.flags & FL_CLIENT))
                pname = ball.pusher.netname;
@@ -416,7 +418,7 @@ void nb_spawnteam(string teamname, float teamcolor)
 
 void nb_spawnteams(void)
 {
-       float t_r, t_b, t_y, t_p;
+       float t_r = 0, t_b = 0, t_y = 0, t_p = 0;
        entity e;
        for(e = world; (e = find(e, classname, "nexball_goal"));)
        {
@@ -960,7 +962,6 @@ MUTATOR_DEFINITION(gamemode_nexball)
 
        MUTATOR_ONADD
        {
-           g_nexball = 1;
                g_nexball_meter_period = autocvar_g_nexball_meter_period;
                if(g_nexball_meter_period <= 0)
                        g_nexball_meter_period = 2; // avoid division by zero etc. due to silly users