From: Mario Date: Fri, 14 Oct 2016 17:02:50 +0000 (+1000) Subject: Make nexball's ball bounce off player clips (fixes ball falling into inaccessible... X-Git-Tag: xonotic-v0.8.2~509 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=a09cca0305477e722fcbc79bcf2faef16f06c3a6;p=xonotic%2Fxonotic-data.pk3dir.git Make nexball's ball bounce off player clips (fixes ball falling into inaccessible areas on some maps) --- diff --git a/gamemodes.cfg b/gamemodes.cfg index 7d776b3b7..71f0dc179 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -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" diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 163d7b81c..c9cfb00f6 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -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 == "")