Snap BUBBLESHIELDTRAP to toucher when touched (fixes visual disjoint)

This commit is contained in:
AJ Martinez 2024-03-04 01:17:17 -07:00
parent 7ef793e0f8
commit 14beff2f55

View file

@ -634,6 +634,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_SetTarget(&special->tracer, toucher);
toucher->flags |= MF_NOGRAVITY;
toucher->momz = (8*toucher->scale) * P_MobjFlip(toucher);
// Snap to the unfortunate player and quit moving laterally, or we can end up quite far away
special->momx = 0;
special->momy = 0;
special->x = toucher->x;
special->y = toucher->y;
special->z = toucher->z;
S_StartSound(toucher, sfx_s1b2);
return;