mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 17:51:27 +00:00
Just bumped timer
This commit is contained in:
parent
48e0d64525
commit
b4a1ad4ef2
2 changed files with 10 additions and 2 deletions
|
@ -275,6 +275,7 @@ typedef enum
|
||||||
k_startimer, // Invincibility timer
|
k_startimer, // Invincibility timer
|
||||||
k_spinouttimer, // Wipe-out from a banana peel or oil slick (was "pw_bananacam")
|
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_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
|
// Each item needs its own power slot, for the HUD and held use
|
||||||
k_magnet, // 0x1 = Magnet in inventory
|
k_magnet, // 0x1 = Magnet in inventory
|
||||||
|
|
11
src/k_kart.c
11
src/k_kart.c
|
@ -1140,7 +1140,8 @@ void K_KartBouncer(void)
|
||||||
&& !players[i].kartstuff[k_squishedtimer]
|
&& !players[i].kartstuff[k_squishedtimer]
|
||||||
&& !players[i].kartstuff[k_bootaketimer]
|
&& !players[i].kartstuff[k_bootaketimer]
|
||||||
&& !players[i].kartstuff[k_spinouttimer]
|
&& !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++)
|
for (j = i+1; j < MAXPLAYERS; j++)
|
||||||
if (playeringame[j] && players[j].mo && !P_MobjWasRemoved(players[j].mo)
|
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_growshrinktimer]
|
||||||
&& !players[j].kartstuff[k_bootaketimer]
|
&& !players[j].kartstuff[k_bootaketimer]
|
||||||
&& !players[j].kartstuff[k_spinouttimer]
|
&& !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)
|
if (players[j].mo == players[i].mo)
|
||||||
break;
|
break;
|
||||||
|
@ -1163,7 +1165,9 @@ void K_KartBouncer(void)
|
||||||
else
|
else
|
||||||
K_SwapMomentum(players[i].mo, players[j].mo, false);
|
K_SwapMomentum(players[i].mo, players[j].mo, false);
|
||||||
players[i].collide[j] = true;
|
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].collide[i] = true;
|
||||||
|
players[j].kartstuff[k_justbumped] = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1387,6 +1391,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->kartstuff[k_sounds])
|
if (player->kartstuff[k_sounds])
|
||||||
player->kartstuff[k_sounds]--;
|
player->kartstuff[k_sounds]--;
|
||||||
|
|
||||||
|
if (player->kartstuff[k_justbumped])
|
||||||
|
player->kartstuff[k_justbumped]--;
|
||||||
|
|
||||||
// ???
|
// ???
|
||||||
/*
|
/*
|
||||||
if (player->kartstuff[k_jmp] > 1 && onground)
|
if (player->kartstuff[k_jmp] > 1 && onground)
|
||||||
|
|
Loading…
Reference in a new issue