]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to make jumppads not affect nexball balls
authorMario <mario@smbclan.net>
Sat, 30 Apr 2016 10:56:33 +0000 (20:56 +1000)
committerMario <mario@smbclan.net>
Sat, 30 Apr 2016 10:56:33 +0000 (20:56 +1000)
gamemodes.cfg
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator/gamemode_keepaway.qc

index 3f89d676e1f8ef5da239837a056259c60ec52915..4cf77d52e39bd0373c320cf4231372f5864f633f 100644 (file)
@@ -464,8 +464,10 @@ set g_balance_nexball_secondary_force      500    "stealing projectile force"
 set g_balance_nexball_secondary_refire       0.6  "stealing projectile refire"
 set g_balance_nexball_secondary_animtime     0.3  "stealing projectile animtime"
 set g_nexball_football_physics  2  "0: Revenant's original movement, 1: 0 but half independant of aiming height, 2: 1 fully independant, -1: first recode try"
+set g_nexball_basketball_jumppad 1    "whether basketballs should be pushable by jumppads"
 set g_nexball_basketball_bouncefactor 0.6    "velocity loss when the ball bounces"
 set g_nexball_basketball_bouncestop   0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
+set g_nexball_football_jumppad 1    "whether footballs should be pushable by jumppads"
 set g_nexball_football_bouncefactor   0.6    "velocity loss when the ball bounces"
 set g_nexball_football_bouncestop     0.075  "speed at which the ball stops when it hits the ground (multiplied by sv_gravity)"
 set g_nexball_football_boost_forward      100   "forward velocity boost when the ball is touched"
index 390212d066b4e2cf4955ff5292175aa47bc2117c..d95df1f5eb4941922cb36f8a9316a28142c41e98 100644 (file)
@@ -7,6 +7,7 @@
 int autocvar_g_nexball_goalleadlimit;
 #define autocvar_g_nexball_goallimit cvar("g_nexball_goallimit")
 
+bool autocvar_g_nexball_basketball_jumppad = true;
 float autocvar_g_nexball_basketball_bouncefactor;
 float autocvar_g_nexball_basketball_bouncestop;
 float autocvar_g_nexball_basketball_carrier_highspeed;
@@ -16,6 +17,7 @@ float autocvar_g_nexball_basketball_meter_minpower;
 float autocvar_g_nexball_delay_collect;
 float autocvar_g_nexball_delay_goal;
 float autocvar_g_nexball_delay_start;
+bool autocvar_g_nexball_football_jumppad = true;
 float autocvar_g_nexball_football_bouncefactor;
 float autocvar_g_nexball_football_bouncestop;
 bool autocvar_g_nexball_radar_showallplayers;
@@ -579,6 +581,7 @@ spawnfunc(nexball_basketball)
        if(!self.effects)
                self.effects = autocvar_g_nexball_basketball_effects_default;
        self.solid = SOLID_TRIGGER;
+       self.pushable = autocvar_g_nexball_basketball_jumppad;
        balls |= BALL_BASKET;
        self.bouncefactor = autocvar_g_nexball_basketball_bouncefactor;
        self.bouncestop = autocvar_g_nexball_basketball_bouncestop;
@@ -591,6 +594,7 @@ spawnfunc(nexball_football)
        self.classname = "nexball_football";
        self.solid = SOLID_TRIGGER;
        balls |= BALL_FOOT;
+       self.pushable = autocvar_g_nexball_football_jumppad;
        self.bouncefactor = autocvar_g_nexball_football_bouncefactor;
        self.bouncestop = autocvar_g_nexball_football_bouncestop;
        SpawnBall();
index 9b5a279d55047cfa3b70e523e25d7484d4afe441..95ec703dbd873ebfe51dfe838bf7bfbb533e4b60 100644 (file)
@@ -1415,9 +1415,6 @@ bool isPushable(entity e)
        {
                case "body":
                case "droppedweapon":
-               case "keepawayball":
-               case "nexball_basketball":
-               case "nexball_football":
                        return true;
                case "bullet": // antilagged bullets can't hit this either
                        return false;
index 66ac8a80e38619e61012ce18b3185cda04556926..a3960066c16c228dd1a30f9904a3a230cc0fee8c 100644 (file)
@@ -476,6 +476,7 @@ void ka_SpawnBall() // loads various values for the ball, runs only once at star
        e.glow_color = autocvar_g_keepawayball_trail_color;
        e.glow_trail = true;
        e.flags = FL_ITEM;
+       e.pushable = true;
        e.reset = ka_Reset;
        e.touch = ka_TouchEvent;
        e.owner = world;