From: Mario Date: Sat, 7 Sep 2019 15:10:03 +0000 (+1000) Subject: Do a trace when throwing the flag to ensure it isn't placed inside a solid ceiling X-Git-Tag: xonotic-v0.8.5~1292 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ab65791ba5bfd3cfd10e65592d842dd2c613a3f;p=xonotic%2Fxonotic-data.pk3dir.git Do a trace when throwing the flag to ensure it isn't placed inside a solid ceiling --- diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index 939c70e29..03b2ec9d1 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -440,7 +440,8 @@ void ctf_Handle_Throw(entity player, entity receiver, int droptype) // reset the flag setattachment(flag, NULL, ""); - setorigin(flag, player.origin + FLAG_DROP_OFFSET); + tracebox(player.origin - FLAG_DROP_OFFSET, flag.m_mins, flag.m_maxs, player.origin + FLAG_DROP_OFFSET, MOVE_NOMONSTERS, flag); + setorigin(flag, trace_endpos); flag.owner.flagcarried = NULL; GameRules_scoring_vip(flag.owner, false); flag.owner = NULL;