add targets to MT_FASTLINEs spawned to tell what they're spawned from

This commit is contained in:
Snu 2020-05-14 03:13:00 +01:00
parent f856f18233
commit f24340f46a
2 changed files with 2 additions and 0 deletions

View file

@ -4486,6 +4486,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
player->mo->y + (P_RandomRange(-36,36) * player->mo->scale), player->mo->y + (P_RandomRange(-36,36) * player->mo->scale),
player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20) * player->mo->scale), player->mo->z + (player->mo->height/2) + (P_RandomRange(-20,20) * player->mo->scale),
MT_FASTLINE); 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->angle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy);
fast->momx = 3*player->mo->momx/4; fast->momx = 3*player->mo->momx/4;
fast->momy = 3*player->mo->momy/4; fast->momy = 3*player->mo->momy/4;

View file

@ -8511,6 +8511,7 @@ void A_SPBChase(mobj_t *actor)
actor->y + (P_RandomRange(-24,24) * actor->scale), actor->y + (P_RandomRange(-24,24) * actor->scale),
actor->z + (actor->height/2) + (P_RandomRange(-24,24) * actor->scale), actor->z + (actor->height/2) + (P_RandomRange(-24,24) * actor->scale),
MT_FASTLINE); 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->angle = R_PointToAngle2(0, 0, actor->momx, actor->momy);
//fast->momx = (3*actor->momx)/4; //fast->momx = (3*actor->momx)/4;
//fast->momy = (3*actor->momy)/4; //fast->momy = (3*actor->momy)/4;