]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix last commit and solve http://dev.xonotic.org/issues/784
authorJakob MG <jakob_mg@hotmail.com>
Thu, 29 Dec 2011 14:31:16 +0000 (15:31 +0100)
committerJakob MG <jakob_mg@hotmail.com>
Thu, 29 Dec 2011 14:31:16 +0000 (15:31 +0100)
defaultXonotic.cfg
qcsrc/server/mutators/gamemode_nexball.qc

index 6a1768840567b8dc3e2d0ff6b1cf8618194694dd..084cc67f44701cdccada229f243724dc9c750cec 100644 (file)
@@ -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"
index 32ca0ee0280cf5d59f98b6c55d1e4848d2485b34..6faf5851a08d7e3b968f96407ae63ceff9e750b5 100644 (file)
@@ -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;