Just bumped timer

This commit is contained in:
TehRealSalt 2017-10-31 16:13:25 -04:00
parent 48e0d64525
commit b4a1ad4ef2
2 changed files with 10 additions and 2 deletions

View file

@ -275,6 +275,7 @@ typedef enum
k_startimer, // Invincibility timer
k_spinouttimer, // Wipe-out from a banana peel or oil slick (was "pw_bananacam")
k_laserwisptimer, // The duration and relative angle of the laser
k_justbumped, // Prevent players from endlessly bumping into each other
// Each item needs its own power slot, for the HUD and held use
k_magnet, // 0x1 = Magnet in inventory

View file

@ -1140,7 +1140,8 @@ void K_KartBouncer(void)
&& !players[i].kartstuff[k_squishedtimer]
&& !players[i].kartstuff[k_bootaketimer]
&& !players[i].kartstuff[k_spinouttimer]
&& !players[i].kartstuff[k_startimer])
&& !players[i].kartstuff[k_startimer]
&& !players[i].kartstuff[k_justbumped])
{
for (j = i+1; j < MAXPLAYERS; j++)
if (playeringame[j] && players[j].mo && !P_MobjWasRemoved(players[j].mo)
@ -1148,7 +1149,8 @@ void K_KartBouncer(void)
&& !players[j].kartstuff[k_growshrinktimer]
&& !players[j].kartstuff[k_bootaketimer]
&& !players[j].kartstuff[k_spinouttimer]
&& !players[j].kartstuff[k_startimer])
&& !players[j].kartstuff[k_startimer]
&& !players[j].kartstuff[k_justbumped])
{
if (players[j].mo == players[i].mo)
break;
@ -1163,7 +1165,9 @@ void K_KartBouncer(void)
else
K_SwapMomentum(players[i].mo, players[j].mo, false);
players[i].collide[j] = true;
players[i].kartstuff[k_justbumped] = 6; // let the animation finish before letting you bump again :V
players[j].collide[i] = true;
players[j].kartstuff[k_justbumped] = 6;
}
}
else
@ -1387,6 +1391,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->kartstuff[k_sounds])
player->kartstuff[k_sounds]--;
if (player->kartstuff[k_justbumped])
player->kartstuff[k_justbumped]--;
// ???
/*
if (player->kartstuff[k_jmp] > 1 && onground)