]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make nexball's ball bounce off player clips (fixes ball falling into inaccessible...
authorMario <mario@smbclan.net>
Fri, 14 Oct 2016 17:02:50 +0000 (03:02 +1000)
committerMario <mario@smbclan.net>
Fri, 14 Oct 2016 17:02:50 +0000 (03:02 +1000)
gamemodes.cfg
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc

index 7d776b3b77fa5bc76c9fce1fc4ea7b0682da4737..71f0dc1792200bea112c846ba847e47c7526bf29 100644 (file)
@@ -489,6 +489,7 @@ set g_nexball_sound_bounce   1    "bouncing sound (0: off)"
 set g_nexball_basketball_trail  1  "1 to leave a trail"
 set g_nexball_football_trail    0  "1 to leave a trail"
 set g_nexball_trail_color     254  "1-256 for different colors (Quake palette, 254 is white)"
+set g_nexball_playerclip_collisions 1 "make the ball bounce off clips"
 set g_nexball_radar_showallplayers 1  "1: show every player and the ball on the radar  0: only show teammates and the ball on the radar"
 seta g_nexball_safepass_maxdist 5000 "Max distance to allow save fassping (0 to turn off safe passing)"
 seta g_nexball_safepass_turnrate 0.1 "How fast the safe-pass ball can habge direction"
index 163d7b81cbda375b689661b62b3e7498ad77bd65..c9cfb00f6ed475ed324fdf65813dda0dc2ca0f30 100644 (file)
@@ -34,6 +34,7 @@ float autocvar_g_nexball_football_bouncestop;
 bool autocvar_g_nexball_radar_showallplayers;
 bool autocvar_g_nexball_sound_bounce;
 int autocvar_g_nexball_trail_color;
+bool autocvar_g_nexball_playerclip_collisions = true;
 
 float autocvar_g_nexball_safepass_turnrate;
 float autocvar_g_nexball_safepass_maxdist;
@@ -552,6 +553,12 @@ void SpawnBall(entity this)
 
        set_movetype(this, MOVETYPE_FLY);
 
+       if(autocvar_g_nexball_playerclip_collisions)
+       {
+               this.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID | DPCONTENTS_PLAYERCLIP;
+               this.dphitcontentsmask |= DPCONTENTS_PLAYERCLIP;
+       }
+
        if(!autocvar_g_nexball_sound_bounce)
                this.noise = "";
        else if(this.noise == "")