From d3ddb8e998caf500bd6467e4dd28785c1697cc6b Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sun, 23 Jan 2022 18:06:39 +0100 Subject: [PATCH] prevent dropship routes through playerclip --- qcsrc/common/gamemodes/gamemode/br/sv_dropship.qc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/gamemodes/gamemode/br/sv_dropship.qc b/qcsrc/common/gamemodes/gamemode/br/sv_dropship.qc index 60960e54c..4750ad72b 100644 --- a/qcsrc/common/gamemodes/gamemode/br/sv_dropship.qc +++ b/qcsrc/common/gamemodes/gamemode/br/sv_dropship.qc @@ -12,7 +12,7 @@ entity dropship_initialize() { entity this = dropship_spawn(VEH_RACER, autocvar_g_br_dropship_scale, autocvar_g_br_dropship_color); - bool moveSucceeded = MoveToRandomLocationWithinBounds(this, world.mins, world.maxs, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 2500, 8192, 1024); + bool moveSucceeded = MoveToRandomLocationWithinBounds(this, world.mins, world.maxs, this.dphitcontentsmask, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 2500, 8192, 1024); if(!moveSucceeded) { delete(this); @@ -65,6 +65,8 @@ entity dropship_spawn(Vehicle info, float entity_scale, vector color) this.vehicleid = info.vehicleid; this.vehicledef = info; this.dphitcontentsmask = DPCONTENTS_SOLID; + if(autocvar_g_playerclip_collisions) + this.dphitcontentsmask |= DPCONTENTS_PLAYERCLIP; this.flags = FL_NOTARGET; this.nextthink = time; setthink(this, dropship_think); -- 2.39.2