From: bones_was_here Date: Thu, 25 May 2023 02:47:41 +0000 (+1000) Subject: Fix thrown/dropped gametype objectives getting stuck in solid X-Git-Tag: xonotic-v0.8.6~81 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=858e9781f39d5dafa93eabbfd873858f592d3b0e;p=xonotic%2Fxonotic-data.pk3dir.git Fix thrown/dropped gametype objectives getting stuck in solid This should have been included in https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/1131 --- diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index d92dd0a3b..bdfab9cd1 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -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; diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc index 8b024dbc7..f39885a28 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc @@ -203,6 +203,7 @@ void ka_DropEvent(entity player) // runs any time that a player is supposed to l IL_PUSH(g_damagedbycontents, ball); ball.effects &= ~EF_NODRAW; setorigin(ball, player.origin + '0 0 10'); + WarpZoneLib_MoveOutOfSolid(ball); // a ball has a bigger bbox than a player ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom(); ball.owner = NULL; navigation_dynamicgoal_set(ball, player); diff --git a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc index ac0e40774..95beae1c7 100644 --- a/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc +++ b/qcsrc/common/gamemodes/gamemode/keyhunt/sv_keyhunt.qc @@ -288,6 +288,7 @@ void kh_Key_Detach(entity key) // runs every time a key is dropped or lost. Runs key.angles_y += key.owner.angles.y; #endif key.flags = FL_ITEM; + WarpZoneLib_MoveOutOfSolid(key); // a key has a bigger bbox than a player if(!IL_CONTAINS(g_items, key)) IL_PUSH(g_items, key); set_movetype(key, MOVETYPE_TOSS);