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
This commit is contained in:
James R 2024-01-13 18:38:33 -08:00
parent f8f2c51a8d
commit 9af09ec507

View file

@ -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);
}