P_SetTarget fixes, added SPR_SHCK to hw_light.c

This commit is contained in:
lachwright 2019-09-27 02:13:02 +08:00
parent d5e0ac1450
commit 264c60fb70
3 changed files with 6 additions and 5 deletions

View File

@ -197,6 +197,7 @@ light_t *t_lspr[NUMSPRITES] =
&lspr[NOLIGHT], // SPR_EGGO
&lspr[NOLIGHT], // SPR_SEBH
&lspr[NOLIGHT], // SPR_FAKE
&lspr[NOLIGHT], // SPR_SHCK
// Boss 4 (Castle Eggman)
&lspr[NOLIGHT], // SPR_EGGP

View File

@ -8106,7 +8106,7 @@ void A_Boss3ShockThink(mobj_t *actor)
// Break the link if movements are too different
if (FixedHypot(snext->momx - actor->momx, snext->momy - actor->momy) > 12*actor->scale)
{
actor->hnext = NULL;
P_SetTarget(&actor->hnext, NULL);
return;
}
@ -8125,8 +8125,8 @@ void A_Boss3ShockThink(mobj_t *actor)
P_SetTarget(&snew->target, actor->target);
snew->fuse = actor->fuse;
actor->hnext = snew;
snew->hnext = snext;
P_SetTarget(&actor->hnext, snew);
P_SetTarget(&snew->hnext, snext);
}
}
}

View File

@ -4627,8 +4627,8 @@ static void P_Boss3Thinker(mobj_t *mobj)
else
{
if (i == numtospawn - 1)
shock->hnext = sfirst;
sprev->hnext = shock;
P_SetTarget(&shock->hnext, sfirst);
P_SetTarget(&sprev->hnext, shock);
}
P_Thrust(shock, ang, shock->info->speed);