From: Jakob MG Date: Thu, 29 Dec 2011 14:31:16 +0000 (+0100) Subject: fix last commit and solve http://dev.xonotic.org/issues/784 X-Git-Tag: xonotic-v0.6.0~40^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8234fdb94d3fb78e53d1cee365e83bdde6ef5799;p=xonotic%2Fxonotic-data.pk3dir.git fix last commit and solve http://dev.xonotic.org/issues/784 --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 6a17688405..084cc67f44 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 32ca0ee028..6faf5851a0 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;