Autoring: set follower to 50% transparency if player cannot use rings

This commit is contained in:
James R 2024-05-02 20:18:26 -07:00
parent 4a239e024c
commit 489bc15161
3 changed files with 15 additions and 1 deletions

View file

@ -532,6 +532,13 @@ void K_HandleFollower(player_t *player)
{
player->follower->renderflags |= RF_DONTDRAW;
}
else
{
if ((player->pflags & PF_AUTORING) && !(K_PlayerCanUseItem(player) && (player->itemflags & IF_USERINGS)))
{
player->follower->renderflags |= RF_TRANS50;
}
}
// if we're moving let's make the angle the direction we're moving towards. This is to avoid drifting / reverse looking awkward.
if (FixedHypot(player->follower->momx, player->follower->momy) >= player->mo->scale)

View file

@ -12599,7 +12599,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
player->instaWhipCharge = min(player->instaWhipCharge, INSTAWHIP_CHARGETIME - 2);
}
if (player && player->mo && player->mo->health > 0 && !player->spectator && !P_PlayerInPain(player) && !mapreset && leveltime > introtime)
if (player && player->mo && K_PlayerCanUseItem(player))
{
// First, the really specific, finicky items that function without the item being directly in your item slot.
{
@ -14481,4 +14481,9 @@ void K_MakeObjectReappear(mobj_t *mo)
(!P_MobjWasRemoved(mo->punt_ref) ? mo->punt_ref : mo)->reappear = leveltime + (30*TICRATE);
}
boolean K_PlayerCanUseItem(player_t *player)
{
return (player->mo->health > 0 && !player->spectator && !P_PlayerInPain(player) && !mapreset && leveltime > introtime);
}
//}

View file

@ -277,6 +277,8 @@ void K_BumperInflate(player_t *player);
boolean K_ThunderDome(void);
boolean K_PlayerCanUseItem(player_t *player);
#ifdef __cplusplus
} // extern "C"
#endif