Infinite tether uses lightning shield effects

This commit is contained in:
Sally Coolatta 2022-08-23 20:27:19 -04:00
parent ba8c511bb4
commit 0141ea5a7c
3 changed files with 29 additions and 15 deletions

View file

@ -675,6 +675,12 @@ static inline BlockItReturn_t PIT_LightningShieldAttack(mobj_t *thing)
return BMIT_ABORT;
}
if (thing == NULL || P_MobjWasRemoved(thing))
{
// Invalid?
return BMIT_ABORT;
}
if (thing == lightningSource)
{
// Don't explode yourself!!

View file

@ -1725,8 +1725,16 @@ static void K_DrawDraftCombiring(player_t *player, player_t *victim, fixed_t cur
curz + (P_RandomRange(24,48)*mapobjectscale),
MT_SIGNSPARKLE);
P_SetMobjState(band, S_SIGNSPARK1 + (leveltime % 11));
P_SetScale(band, (band->destscale = (3*player->mo->scale)/2));
if (maxdist == 0)
{
P_SetMobjState(band, S_KSPARK1 + (leveltime % 8));
P_SetScale(band, (band->destscale = player->mo->scale/2));
}
else
{
P_SetMobjState(band, S_SIGNSPARK1 + (leveltime % 11));
P_SetScale(band, (band->destscale = (3*player->mo->scale)/2));
}
band->color = colors[c];
band->colorized = true;

View file

@ -14032,21 +14032,21 @@ void A_LightningFollowPlayer(mobj_t *actor)
if (!actor->target)
return;
if (actor->extravalue1) // Make the radius also follow the player somewhat accuratly
{
if (actor->extravalue1) // Make the radius also follow the player somewhat accuratly
{
sx = actor->target->x + FixedMul((actor->target->scale*actor->extravalue1), FINECOSINE((actor->angle)>>ANGLETOFINESHIFT));
sy = actor->target->y + FixedMul((actor->target->scale*actor->extravalue1), FINESINE((actor->angle)>>ANGLETOFINESHIFT));
P_MoveOrigin(actor, sx, sy, actor->target->z);
}
else // else just teleport to player directly
P_MoveOrigin(actor, actor->target->x, actor->target->y, actor->target->z);
K_MatchGenericExtraFlags(actor, actor->target); // copy our target for graviflip
actor->momx = actor->target->momx;
actor->momy = actor->target->momy;
actor->momz = actor->target->momz; // Give momentum since we don't teleport to our player literally every frame.
sx = actor->target->x + FixedMul((actor->target->scale*actor->extravalue1), FINECOSINE((actor->angle)>>ANGLETOFINESHIFT));
sy = actor->target->y + FixedMul((actor->target->scale*actor->extravalue1), FINESINE((actor->angle)>>ANGLETOFINESHIFT));
P_MoveOrigin(actor, sx, sy, actor->target->z);
}
else // else just teleport to player directly
{
P_MoveOrigin(actor, actor->target->x, actor->target->y, actor->target->z);
}
K_MatchGenericExtraFlags(actor, actor->target); // copy our target for graviflip
actor->momx = actor->target->momx;
actor->momy = actor->target->momy;
actor->momz = actor->target->momz; // Give momentum since we don't teleport to our player literally every frame.
}
// A_FZBoomFlash: