diff --git a/src/k_kart.c b/src/k_kart.c index e90092a9..7ac35cd3 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -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); } diff --git a/src/p_enemy.c b/src/p_enemy.c index e34686be..2693c8cc 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -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); }