Obj_JawzThrown: chase UFO Catcher immediately

Done here so Jawz fulfills water running condition during
K_SpawnKartMissile.
This commit is contained in:
James R 2023-08-15 00:42:30 -07:00
parent 99c4d798a1
commit b46bfc8766

View file

@ -255,12 +255,14 @@ void Obj_JawzThink(mobj_t *th)
void Obj_JawzThrown(mobj_t *th, fixed_t finalSpeed, SINT8 dir)
{
INT32 lastTarg = -1;
player_t *owner = NULL;
if (jawz_owner(th) != NULL && P_MobjWasRemoved(jawz_owner(th)) == false
&& jawz_owner(th)->player != NULL)
{
lastTarg = jawz_owner(th)->player->lastjawztarget;
jawz_retcolor(th) = jawz_owner(th)->player->skincolor;
owner = jawz_owner(th)->player;
}
else
{
@ -297,6 +299,14 @@ void Obj_JawzThrown(mobj_t *th, fixed_t finalSpeed, SINT8 dir)
P_SetTarget(&jawz_chase(th), tryPlayer->mo);
}
}
// Sealed Star: target the UFO immediately. I don't
// wanna fuck with the lastjawztarget stuff, so just
// do this if a target wasn't set.
if (jawz_chase(th) == NULL || P_MobjWasRemoved(jawz_chase(th)) == true)
{
P_SetTarget(&jawz_chase(th), K_FindJawzTarget(th, owner, ANGLE_90));
}
}
S_StartSound(th, th->info->activesound);