From: Samual Lenks Date: Sun, 2 Sep 2012 19:47:16 +0000 (-0400) Subject: Fix nexball code from using CTF's entities X-Git-Tag: xonotic-v0.7.0~240^2~60 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=695514fc099c140d6f6eebfed43db0322b7e5add;p=xonotic%2Fxonotic-data.pk3dir.git Fix nexball code from using CTF's entities --- diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index 1b9474635..d4b187a29 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -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; diff --git a/qcsrc/server/mutators/gamemode_nexball.qh b/qcsrc/server/mutators/gamemode_nexball.qh index 545ec96d7..4b0b7eaa1 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qh +++ b/qcsrc/server/mutators/gamemode_nexball.qh @@ -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;