SPB intangibility

This commit is contained in:
Latapostrophe 2019-05-12 14:17:56 +02:00 committed by wolfy852
parent 66439fe812
commit a40ff75025
1 changed files with 12 additions and 0 deletions

View File

@ -8355,6 +8355,7 @@ void A_SPBChase(mobj_t *actor)
actor->lastlook = -1;
spbplace = -1;
P_InstaThrust(actor, actor->angle, wspeed);
actor->flags &= ~MF_NOCLIPTHING; // just in case.
return;
}
@ -8384,6 +8385,10 @@ void A_SPBChase(mobj_t *actor)
{
if (actor->tracer && actor->tracer->health)
{
// we're tailing a player, now's a good time to regain our damage properties
actor->flags &= ~MF_NOCLIPTHING;
fixed_t defspeed = wspeed;
fixed_t range = (160*actor->tracer->scale);
fixed_t cx = 0, cy =0;
@ -8515,6 +8520,9 @@ void A_SPBChase(mobj_t *actor)
{
actor->momx = actor->momy = actor->momz = 0; // Stoooop
// don't hurt players that have nothing to do with this:
actor->flags |= MF_NOCLIPTHING;
if (actor->lastlook != -1
&& playeringame[actor->lastlook]
&& !players[actor->lastlook].spectator
@ -8550,6 +8558,10 @@ void A_SPBChase(mobj_t *actor)
}
// Found someone, now get close enough to initiate the slaughter...
// don't hurt players that have nothing to do with this:
actor->flags |= MF_NOCLIPTHING;
P_SetTarget(&actor->tracer, player->mo);
spbplace = bestrank;