mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-12 11:03:02 +00:00
Autoring: set follower to 50% transparency if player cannot use rings
This commit is contained in:
parent
4a239e024c
commit
489bc15161
3 changed files with 15 additions and 1 deletions
|
|
@ -532,6 +532,13 @@ void K_HandleFollower(player_t *player)
|
||||||
{
|
{
|
||||||
player->follower->renderflags |= RF_DONTDRAW;
|
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 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)
|
if (FixedHypot(player->follower->momx, player->follower->momy) >= player->mo->scale)
|
||||||
|
|
|
||||||
|
|
@ -12599,7 +12599,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->instaWhipCharge = min(player->instaWhipCharge, INSTAWHIP_CHARGETIME - 2);
|
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.
|
// 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);
|
(!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);
|
||||||
|
}
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,8 @@ void K_BumperInflate(player_t *player);
|
||||||
|
|
||||||
boolean K_ThunderDome(void);
|
boolean K_ThunderDome(void);
|
||||||
|
|
||||||
|
boolean K_PlayerCanUseItem(player_t *player);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue