]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix nexball code from using CTF's entities
authorSamual Lenks <samual@xonotic.org>
Sun, 2 Sep 2012 19:47:16 +0000 (15:47 -0400)
committerSamual Lenks <samual@xonotic.org>
Sun, 2 Sep 2012 19:47:16 +0000 (15:47 -0400)
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_nexball.qh

index 1b94746356c85ee15576d809f3e0ce3b57f9c076..d4b187a299e575085dc7ff0e811df2ae037fb232 100644 (file)
@@ -117,7 +117,7 @@ void GiveBall(entity plyr, entity ball)
        ball.owner = ball.pusher = plyr; //"owner" is set to the player carrying, "pusher" to the last player who touched it
        ball.team = plyr.team;
        plyr.ballcarried = ball;
-       ball.ctf_dropper = plyr;
+       ball.nb_dropper = plyr;
 
        plyr.effects |= autocvar_g_nexball_basketball_effects_default;
        ball.effects &~= autocvar_g_nexball_basketball_effects_default;
@@ -160,7 +160,7 @@ void DropBall(entity ball, vector org, vector vel)
        ball.flags &~= FL_ONGROUND;
        ball.scale = ball_scale;
        ball.velocity = vel;
-       ball.ctf_droptime = time;
+       ball.nb_droptime = time;
        ball.touch = basketball_touch;
        ball.think = ResetBall;
        ball.nextthink = min(time + autocvar_g_nexball_delay_idle, ball.teamtime);
@@ -287,7 +287,7 @@ void basketball_touch(void)
                football_touch();
                return;
        }
-       if(!self.cnt && other.classname == "player" && (other != self.ctf_dropper || time > self.ctf_droptime + autocvar_g_nexball_delay_collect))
+       if(!self.cnt && other.classname == "player" && (other != self.nb_dropper || time > self.nb_droptime + autocvar_g_nexball_delay_collect))
        {
                if(other.health <= 0)
                        return;
index 545ec96d75295764b09b55c6368cbf95f633a71c..4b0b7eaa15c67a3dd686ce2e00474803730684a8 100644 (file)
@@ -27,4 +27,7 @@ float balls;
 float ball_scale;
 float nb_teams;
 
-.float teamtime;
\ No newline at end of file
+.entity nb_dropper;
+.float nb_droptime;
+
+.float teamtime;