From 9af09ec5076a67d35df1141331be71ced47b41dd Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 13 Jan 2024 18:38:33 -0800 Subject: [PATCH] Bubble/Guard: fix reflected item intangibility, transfer ownership of reflected items - Ignores item just-thrown intangibility only if the item owner is the same (standard behavior) - Player who reflected the item takes ownership of it - Required to make intangibility work correctly - Improvement to game design --- src/k_collide.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/k_collide.cpp b/src/k_collide.cpp index 30cdf5745..afc72e998 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -769,7 +769,9 @@ boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2) } else { - if (!t2->threshold || t2->type == MT_DROPTARGET) + mobj_t *owner = t1->player ? t1 : t1->target; + + if (t2->target != owner || !t2->threshold || t2->type == MT_DROPTARGET) { if (t1->player && K_PlayerGuard(t1->player)) { @@ -789,6 +791,7 @@ boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2) } if (t2->type == MT_JAWZ) P_SetTarget(&t2->tracer, t2->target); // Back to the source! + P_SetTarget(&t2->target, owner); // Let the source reflect it back again! t2->threshold = 10; S_StartSound(t1, sfx_s3k44); }