mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 12:50:44 +00:00
Use P_SetTarget instead of fast->target
This commit is contained in:
parent
3997c05988
commit
6b5eebe54a
2 changed files with 2 additions and 2 deletions
|
@ -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->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;
|
||||||
fast->momz = 3*player->mo->momz/4;
|
fast->momz = 3*player->mo->momz/4;
|
||||||
|
P_SetTarget(&fast->target, player->mo); // easier lua access
|
||||||
K_MatchGenericExtraFlags(fast, player->mo);
|
K_MatchGenericExtraFlags(fast, player->mo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8511,13 +8511,13 @@ 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;
|
||||||
//fast->momz = (3*actor->momz)/4;
|
//fast->momz = (3*actor->momz)/4;
|
||||||
fast->color = SKINCOLOR_RED;
|
fast->color = SKINCOLOR_RED;
|
||||||
fast->colorized = true;
|
fast->colorized = true;
|
||||||
|
P_SetTarget(&fast->target, actor); // easier lua access
|
||||||
K_MatchGenericExtraFlags(fast, actor);
|
K_MatchGenericExtraFlags(fast, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue