mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-31 12:13:16 +00:00
Briefly remove players from reality on early POSITION beam cross
This commit is contained in:
parent
79796b00f5
commit
30457f6b79
4 changed files with 31 additions and 5 deletions
|
|
@ -107,6 +107,8 @@ typedef enum
|
|||
PF_SHRINKME = 1<<28, // "Shrink me" cheat preference
|
||||
PF_SHRINKACTIVE = 1<<29, // "Shrink me" cheat is in effect. (Can't be disabled mid-race)
|
||||
|
||||
PF_VOID = 1<<30
|
||||
|
||||
// up to 1<<31 is free
|
||||
} pflags_t;
|
||||
|
||||
|
|
|
|||
16
src/k_kart.c
16
src/k_kart.c
|
|
@ -7788,6 +7788,22 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->superring--;
|
||||
}
|
||||
|
||||
if (player->pflags & PF_VOID) // Returning from FAULT VOID
|
||||
{
|
||||
player->pflags &= ~PF_VOID;
|
||||
player->mo->renderflags &= ~RF_DONTDRAW;
|
||||
player->mo->flags &= ~MF_NOCLIPTHING;
|
||||
player->mo->momx = 0;
|
||||
player->mo->momy = 0;
|
||||
player->mo->momz = 0;
|
||||
player->nocontrol = 0;
|
||||
player->driftboost = 0;
|
||||
player->strongdriftboost = 0;
|
||||
player->tiregrease = 0;
|
||||
player->sneakertimer = 0;
|
||||
player->spindashboost = 0;
|
||||
}
|
||||
|
||||
if (player->stealingtimer == 0
|
||||
&& player->rocketsneakertimer)
|
||||
player->rocketsneakertimer--;
|
||||
|
|
|
|||
15
src/p_spec.c
15
src/p_spec.c
|
|
@ -1909,10 +1909,17 @@ static void K_HandleLapIncrement(player_t *player)
|
|||
{
|
||||
if (leveltime < starttime && !(gametyperules & GTR_ROLLINGSTART))
|
||||
{
|
||||
// Will fault the player
|
||||
K_DoIngameRespawn(player);
|
||||
// freeze 'em until fault penalty is over
|
||||
player->mo->hitlag = starttime - leveltime + 50;
|
||||
player->pflags = PF_VOID;
|
||||
player->mo->renderflags |= RF_DONTDRAW;
|
||||
player->mo->flags |= MF_NOCLIPTHING;
|
||||
player->nocontrol = 69;
|
||||
player->hyudorotimer = 69;
|
||||
K_StripItems(player);
|
||||
}
|
||||
else if ((player->starpostnum == numstarposts) || (player->laps == 0))
|
||||
|
||||
if ((player->starpostnum == numstarposts) || (player->laps == 0))
|
||||
{
|
||||
size_t i = 0;
|
||||
UINT8 nump = 0;
|
||||
|
|
@ -1948,7 +1955,7 @@ static void K_HandleLapIncrement(player_t *player)
|
|||
player->karthud[khud_lapanimation] = 80;
|
||||
}
|
||||
|
||||
if (rainbowstartavailable == true)
|
||||
if (rainbowstartavailable == true && player->mo->hitlag == 0)
|
||||
{
|
||||
S_StartSound(player->mo, sfx_s23c);
|
||||
player->startboost = 125;
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ void SetRandomFakePlayerSkin(player_t* player, boolean fast)
|
|||
|
||||
SetFakePlayerSkin(player, i);
|
||||
|
||||
if (player->mo && player->spectator == false)
|
||||
if (player->mo && player->spectator == false && !(player->pflags & PF_VOID))
|
||||
{
|
||||
S_StartSound(player->mo, sfx_kc33);
|
||||
S_StartSound(player->mo, sfx_cdfm44);
|
||||
|
|
@ -448,6 +448,7 @@ void SetRandomFakePlayerSkin(player_t* player, boolean fast)
|
|||
P_SetTarget(&box->target, parent);
|
||||
box->angle = FixedAngle((baseangle + j*90) * FRACUNIT);
|
||||
box->flags2 |= MF2_AMBUSH;
|
||||
box->renderflags |= parent->renderflags;
|
||||
if (fast)
|
||||
{
|
||||
box->extravalue1 = 10; // Rotation rate
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue