From 8234fdb94d3fb78e53d1cee365e83bdde6ef5799 Mon Sep 17 00:00:00 2001 From: Jakob MG Date: Thu, 29 Dec 2011 15:31:16 +0100 Subject: [PATCH] fix last commit and solve http://dev.xonotic.org/issues/784 --- defaultXonotic.cfg | 2 ++ qcsrc/server/mutators/gamemode_nexball.qc | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 6a1768840..084cc67f4 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -624,6 +624,8 @@ seta g_nexball_safepass_turnrate 0.1 // How fast the safe-pass ball can habge seta g_nexball_safepass_holdtime 0.75 // How long to remeber last teammate you pointed at seta g_nexball_viewmodel_scale 0.25 // How large the ball for the carrier seta g_nexball_viewmodel_offset "8 8 0" // Where the ball is located on carrier "forward right up" +seta g_nexball_tackling 1 // Allow ball theft? + seta g_ctf_win_mode 0 "0: captures only, 1: captures, then points, 2: points only" seta g_ctf_ignore_frags 0 "1: regular frags give no points" diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index 32ca0ee02..6faf5851a 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -2,6 +2,7 @@ float autocvar_g_nexball_safepass_turnrate; float autocvar_g_nexball_safepass_maxdist; float autocvar_g_nexball_safepass_holdtime; float autocvar_g_nexball_viewmodel_scale; +float autocvar_g_nexball_tackling; vector autocvar_g_nexball_viewmodel_offset; void basketball_touch(); @@ -729,14 +730,17 @@ void W_Nexball_Attack(float t) void W_Nexball_Attack2(void) { - if(ball.enemy) + if(self.ballcarried.enemy) { - ball.think = W_Nexball_Think; - ball.nextthink = time; - DropBall(ball, w_shotorg, trigger_push_calculatevelocity(ball.origin, ball.enemy, 32)); + self.ballcarried.think = W_Nexball_Think; + self.ballcarried.nextthink = time; + DropBall(self.ballcarried, w_shotorg, trigger_push_calculatevelocity(self.ballcarried.origin, self.ballcarried.enemy, 32)); return; } - + + if(!autocvar_g_nexball_tackling) + return; + entity missile; if(!(balls & BALL_BASKET)) return; -- 2.39.2