mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't drop emeralds unless it's a new hit
This commit is contained in:
parent
d9dda87586
commit
20f57d7efa
4 changed files with 12 additions and 0 deletions
|
|
@ -746,6 +746,8 @@ struct player_t
|
|||
UINT8 instaShieldCooldown;
|
||||
UINT8 guardCooldown;
|
||||
|
||||
UINT16 incontrol;
|
||||
|
||||
uint8_t public_key[PUBKEYLENGTH];
|
||||
|
||||
#ifdef HWRENDER
|
||||
|
|
|
|||
|
|
@ -265,6 +265,9 @@ void K_DropEmeraldsFromPlayer(player_t *player, UINT32 emeraldType)
|
|||
UINT8 i;
|
||||
SINT8 flip = P_MobjFlip(player->mo);
|
||||
|
||||
if (player->incontrol < TICRATE)
|
||||
return;
|
||||
|
||||
for (i = 0; i < 14; i++)
|
||||
{
|
||||
UINT32 emeraldFlag = (1 << i);
|
||||
|
|
|
|||
|
|
@ -8031,6 +8031,11 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->tiregrease)
|
||||
player->tiregrease--;
|
||||
|
||||
if (player->spinouttimer || player->tumbleBounces)
|
||||
player->incontrol = 0;
|
||||
else
|
||||
player->incontrol++;
|
||||
|
||||
if (player->tumbleBounces > 0)
|
||||
{
|
||||
K_HandleTumbleSound(player);
|
||||
|
|
|
|||
|
|
@ -428,6 +428,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
|||
|
||||
WRITEUINT8(save->p, players[i].instaShieldCooldown);
|
||||
WRITEUINT8(save->p, players[i].guardCooldown);
|
||||
WRITEUINT16(save->p, players[i].incontrol);
|
||||
|
||||
// respawnvars_t
|
||||
WRITEUINT8(save->p, players[i].respawn.state);
|
||||
|
|
@ -819,6 +820,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
|||
|
||||
players[i].instaShieldCooldown = READUINT8(save->p);
|
||||
players[i].guardCooldown = READUINT8(save->p);
|
||||
players[i].incontrol = READUINT16(save->p);
|
||||
|
||||
// respawnvars_t
|
||||
players[i].respawn.state = READUINT8(save->p);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue