mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Review fixup
This commit is contained in:
parent
691311ab14
commit
4c927b09d1
5 changed files with 20 additions and 9 deletions
|
|
@ -746,7 +746,7 @@ struct player_t
|
|||
UINT8 instaShieldCooldown;
|
||||
UINT8 guardCooldown;
|
||||
|
||||
UINT16 incontrol;
|
||||
INT16 incontrol; // -1 to -175 when spinning out or tumbling, 1 to 175 when not. Use to check for combo hits or emergency inputs.
|
||||
|
||||
uint8_t public_key[PUBKEYLENGTH];
|
||||
|
||||
|
|
|
|||
19
src/k_kart.c
19
src/k_kart.c
|
|
@ -7812,7 +7812,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
// where's the < 0 check? see below the following block!
|
||||
|
||||
{
|
||||
tic_t spheredigestion = TICRATE*2; // Base rate of 1 every second when playing.
|
||||
tic_t spheredigestion = TICRATE*2; // Base rate of 1 every 2 seconds when playing.
|
||||
tic_t digestionpower = ((10 - player->kartspeed) + (10 - player->kartweight))-1; // 1 to 17
|
||||
|
||||
// currently 0-34
|
||||
|
|
@ -7926,7 +7926,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->guardCooldown--;
|
||||
|
||||
if (player->whip && P_MobjWasRemoved(player->whip))
|
||||
player->whip = NULL;
|
||||
player->whip = P_SetTarget(&player->whip, NULL);
|
||||
|
||||
if (player->startboost > 0 && onground == true)
|
||||
{
|
||||
|
|
@ -8032,9 +8032,20 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
player->tiregrease--;
|
||||
|
||||
if (player->spinouttimer || player->tumbleBounces)
|
||||
player->incontrol = 0;
|
||||
{
|
||||
if (player->incontrol > 0)
|
||||
player->incontrol = 0;
|
||||
player->incontrol--;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->incontrol < 0)
|
||||
player->incontrol = 0;
|
||||
player->incontrol++;
|
||||
}
|
||||
|
||||
player->incontrol = min(player->incontrol, 5*TICRATE);
|
||||
player->incontrol = max(player->incontrol, -5*TICRATE);
|
||||
|
||||
if (player->tumbleBounces > 0)
|
||||
{
|
||||
|
|
@ -10626,7 +10637,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
player->guardCooldown = 50;
|
||||
S_StartSound(player->mo, sfx_iwhp);
|
||||
mobj_t *whip = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_INSTAWHIP);
|
||||
player->whip = whip;
|
||||
player->whip = P_SetTarget(&player->whip, whip);
|
||||
P_SetScale(whip, player->mo->scale);
|
||||
P_SetTarget(&whip->target, player->mo);
|
||||
K_MatchGenericExtraFlags(whip, player->mo);
|
||||
|
|
|
|||
|
|
@ -81,4 +81,4 @@ void Obj_GuardBreakThink (mobj_t *fx)
|
|||
fx->renderflags &= ~RF_DONTDRAW;
|
||||
else
|
||||
fx->renderflags |= RF_DONTDRAW;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,4 @@ void Obj_InstaWhipThink (mobj_t *whip)
|
|||
if (whip->extravalue2) // Whip has no hitbox but removing it is a pain in the ass
|
||||
whip->renderflags |= RF_DONTDRAW;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -428,7 +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);
|
||||
WRITEINT16(save->p, players[i].incontrol);
|
||||
|
||||
// respawnvars_t
|
||||
WRITEUINT8(save->p, players[i].respawn.state);
|
||||
|
|
@ -820,7 +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);
|
||||
players[i].incontrol = READINT16(save->p);
|
||||
|
||||
// respawnvars_t
|
||||
players[i].respawn.state = READUINT8(save->p);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue