From: Mario Date: Sat, 30 Apr 2016 10:56:33 +0000 (+1000) Subject: Add an option to make jumppads not affect nexball balls X-Git-Tag: xonotic-v0.8.2~936 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c914a05e8e91853fe003d7d03b1f3ddbf0881f39;p=xonotic%2Fxonotic-data.pk3dir.git Add an option to make jumppads not affect nexball balls --- diff --git a/gamemodes.cfg b/gamemodes.cfg index 3f89d676e..4cf77d52e 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -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" diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 390212d06..d95df1f5e 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -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(); diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 9b5a279d5..95ec703db 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -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; diff --git a/qcsrc/server/mutators/mutator/gamemode_keepaway.qc b/qcsrc/server/mutators/mutator/gamemode_keepaway.qc index 66ac8a80e..a3960066c 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keepaway.qc @@ -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;