mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Follower hitlag
- If a player enters hitlag, put their follower in hitlag too - If a follower exists and is in hitlag, don't update it in K_HandleFollower
This commit is contained in:
parent
2aa43f04b2
commit
ba3a3f4203
1 changed files with 13 additions and 0 deletions
|
|
@ -406,6 +406,12 @@ void K_HandleFollower(player_t *player)
|
|||
}
|
||||
else // follower exists, woo!
|
||||
{
|
||||
if (player->follower->hitlag != 0)
|
||||
{
|
||||
// Don't update frames in hitlag
|
||||
return;
|
||||
}
|
||||
|
||||
// first of all, handle states following the same model as above:
|
||||
if (player->follower->tics == 1)
|
||||
{
|
||||
|
|
@ -621,4 +627,11 @@ void K_HandleFollower(player_t *player)
|
|||
K_UpdateFollowerState(player->follower, fl.idlestate, FOLLOWERSTATE_IDLE);
|
||||
}
|
||||
}
|
||||
|
||||
if (player->mo->hitlag)
|
||||
{
|
||||
player->follower->hitlag = player->mo->hitlag;
|
||||
player->follower->eflags |= (player->mo->eflags & MFE_DAMAGEHITLAG);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue