Use P_SetTarget instead of fast->target

This commit is contained in:
Snu 2020-05-14 04:17:24 +01:00
parent 3997c05988
commit 6b5eebe54a
2 changed files with 2 additions and 2 deletions

View file

@ -4486,11 +4486,11 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
player->mo->y + (P_RandomRange(-36,36) * player->mo->scale),
player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20) * player->mo->scale),
MT_FASTLINE);
fast->target = player->mo; // makes it easier to link it back to afterwards
fast->angle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
fast->momx = 3*player->mo->momx/4;
fast->momy = 3*player->mo->momy/4;
fast->momz = 3*player->mo->momz/4;
P_SetTarget(&fast->target, player->mo); // easier lua access
K_MatchGenericExtraFlags(fast, player->mo);
}

View file

@ -8511,13 +8511,13 @@ void A_SPBChase(mobj_t *actor)
actor->y + (P_RandomRange(-24,24) * actor->scale),
actor->z + (actor->height/2) + (P_RandomRange(-24,24) * actor->scale),
MT_FASTLINE);
fast->target = actor; // makes it easier to link it back to afterwards
fast->angle = R_PointToAngle2(0, 0, actor->momx, actor->momy);
//fast->momx = (3*actor->momx)/4;
//fast->momy = (3*actor->momy)/4;
//fast->momz = (3*actor->momz)/4;
fast->color = SKINCOLOR_RED;
fast->colorized = true;
P_SetTarget(&fast->target, actor); // easier lua access
K_MatchGenericExtraFlags(fast, actor);
}