]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
Fix thrown/dropped gametype objectives getting stuck in solid
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / ctf / sv_ctf.qc
index d92dd0a3b99245f0d38553f429edbd3a248e0254..bdfab9cd1dbc97e20b4e1cabd7310019d7e59e47 100644 (file)
@@ -466,9 +466,9 @@ void ctf_Handle_Throw(entity player, entity receiver, int droptype)
 
        // reset the flag
        setattachment(flag, NULL, "");
-       tracebox(player.origin - FLAG_DROP_OFFSET, flag.m_mins, flag.m_maxs, player.origin + FLAG_DROP_OFFSET, MOVE_NOMONSTERS, flag);
        flag.solid = SOLID_TRIGGER; // before setorigin to ensure area grid linking
-       setorigin(flag, trace_endpos);
+       setorigin(flag, player.origin);
+       WarpZoneLib_MoveOutOfSolid(flag); // a flag has a bigger bbox than a player
        flag.owner.flagcarried = NULL;
        GameRules_scoring_vip(flag.owner, false);
        flag.owner = NULL;