mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Move bumpslow to botvars
This commit is contained in:
parent
e19473e322
commit
eae8e1516b
5 changed files with 7 additions and 14 deletions
|
|
@ -406,6 +406,7 @@ struct botvars_t
|
||||||
// All entries above persist between rounds and must be recorded in demos
|
// All entries above persist between rounds and must be recorded in demos
|
||||||
|
|
||||||
fixed_t rubberband; // Bot rubberband value
|
fixed_t rubberband; // Bot rubberband value
|
||||||
|
UINT8 bumpslow;
|
||||||
|
|
||||||
tic_t itemdelay; // Delay before using item at all
|
tic_t itemdelay; // Delay before using item at all
|
||||||
tic_t itemconfirm; // When high enough, they will use their item
|
tic_t itemconfirm; // When high enough, they will use their item
|
||||||
|
|
@ -844,8 +845,6 @@ struct player_t
|
||||||
UINT8 trickboost; // Trick boost. This one is weird and has variable speed. Dear god.
|
UINT8 trickboost; // Trick boost. This one is weird and has variable speed. Dear god.
|
||||||
UINT8 tricklock; // Input safety for 2.2 lenient tricks.
|
UINT8 tricklock; // Input safety for 2.2 lenient tricks.
|
||||||
|
|
||||||
UINT8 bumpslow;
|
|
||||||
|
|
||||||
UINT8 dashRingPullTics; // Timer during which the player is pulled towards a dash ring
|
UINT8 dashRingPullTics; // Timer during which the player is pulled towards a dash ring
|
||||||
UINT8 dashRingPushTics; // Timer during which the player displays effects and has no gravity after being thrust by a dash ring
|
UINT8 dashRingPushTics; // Timer during which the player displays effects and has no gravity after being thrust by a dash ring
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -805,7 +805,7 @@ fixed_t K_UpdateRubberband(player_t *player)
|
||||||
|
|
||||||
UINT8 ease_soften = 8;
|
UINT8 ease_soften = 8;
|
||||||
|
|
||||||
if (player->bumpslow && dest > ret)
|
if (player->botvars.bumpslow && dest > ret)
|
||||||
ease_soften *= 10;
|
ease_soften *= 10;
|
||||||
|
|
||||||
// Ease into the new value.
|
// Ease into the new value.
|
||||||
|
|
|
||||||
|
|
@ -9438,8 +9438,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
if (player->trickboost)
|
if (player->trickboost)
|
||||||
player->trickboost--;
|
player->trickboost--;
|
||||||
|
|
||||||
if (player->bumpslow && player->incontrol)
|
if (K_PlayerUsesBotMovement(players) && player->botvars.bumpslow && player->incontrol)
|
||||||
player->bumpslow--;
|
player->botvars.bumpslow--;
|
||||||
|
|
||||||
if (player->flamedash)
|
if (player->flamedash)
|
||||||
{
|
{
|
||||||
|
|
@ -15457,7 +15457,7 @@ void K_BotHitPenalty(player_t *player)
|
||||||
if (K_PlayerUsesBotMovement(player))
|
if (K_PlayerUsesBotMovement(player))
|
||||||
{
|
{
|
||||||
player->botvars.rubberband = max(player->botvars.rubberband/2, FRACUNIT/2);
|
player->botvars.rubberband = max(player->botvars.rubberband/2, FRACUNIT/2);
|
||||||
player->bumpslow = TICRATE*2;
|
player->botvars.bumpslow = TICRATE*2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -526,8 +526,6 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->trickboost);
|
lua_pushinteger(L, plr->trickboost);
|
||||||
else if (fastcmp(field,"tricklock"))
|
else if (fastcmp(field,"tricklock"))
|
||||||
lua_pushinteger(L, plr->tricklock);
|
lua_pushinteger(L, plr->tricklock);
|
||||||
else if (fastcmp(field,"bumpslow"))
|
|
||||||
lua_pushinteger(L, plr->bumpslow);
|
|
||||||
else if (fastcmp(field,"dashringpulltics"))
|
else if (fastcmp(field,"dashringpulltics"))
|
||||||
lua_pushinteger(L, plr->dashRingPullTics);
|
lua_pushinteger(L, plr->dashRingPullTics);
|
||||||
else if (fastcmp(field,"dashringpushtics"))
|
else if (fastcmp(field,"dashringpushtics"))
|
||||||
|
|
@ -1138,8 +1136,6 @@ static int player_set(lua_State *L)
|
||||||
plr->trickboost = luaL_checkinteger(L, 3);
|
plr->trickboost = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"tricklock"))
|
else if (fastcmp(field,"tricklock"))
|
||||||
plr->tricklock = luaL_checkinteger(L, 3);
|
plr->tricklock = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"bumpslow"))
|
|
||||||
plr->bumpslow = luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"dashringpulltics"))
|
else if (fastcmp(field,"dashringpulltics"))
|
||||||
plr->dashRingPullTics = luaL_checkinteger(L, 3);
|
plr->dashRingPullTics = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"dashringpushtics"))
|
else if (fastcmp(field,"dashringpushtics"))
|
||||||
|
|
|
||||||
|
|
@ -569,8 +569,6 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
||||||
WRITEUINT8(save->p, players[i].trickboost);
|
WRITEUINT8(save->p, players[i].trickboost);
|
||||||
WRITEUINT8(save->p, players[i].tricklock);
|
WRITEUINT8(save->p, players[i].tricklock);
|
||||||
|
|
||||||
WRITEUINT8(save->p, players[i].bumpslow);
|
|
||||||
|
|
||||||
WRITEUINT8(save->p, players[i].dashRingPullTics);
|
WRITEUINT8(save->p, players[i].dashRingPullTics);
|
||||||
WRITEUINT8(save->p, players[i].dashRingPushTics);
|
WRITEUINT8(save->p, players[i].dashRingPushTics);
|
||||||
|
|
||||||
|
|
@ -733,6 +731,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
||||||
WRITEUINT8(save->p, players[i].botvars.diffincrease);
|
WRITEUINT8(save->p, players[i].botvars.diffincrease);
|
||||||
WRITEUINT8(save->p, players[i].botvars.rival);
|
WRITEUINT8(save->p, players[i].botvars.rival);
|
||||||
WRITEFIXED(save->p, players[i].botvars.rubberband);
|
WRITEFIXED(save->p, players[i].botvars.rubberband);
|
||||||
|
WRITEUINT8(save->p, players[i].botvars.bumpslow);
|
||||||
WRITEUINT32(save->p, players[i].botvars.itemdelay);
|
WRITEUINT32(save->p, players[i].botvars.itemdelay);
|
||||||
WRITEUINT32(save->p, players[i].botvars.itemconfirm);
|
WRITEUINT32(save->p, players[i].botvars.itemconfirm);
|
||||||
WRITESINT8(save->p, players[i].botvars.turnconfirm);
|
WRITESINT8(save->p, players[i].botvars.turnconfirm);
|
||||||
|
|
@ -1208,8 +1207,6 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
||||||
players[i].trickboost = READUINT8(save->p);
|
players[i].trickboost = READUINT8(save->p);
|
||||||
players[i].tricklock = READUINT8(save->p);
|
players[i].tricklock = READUINT8(save->p);
|
||||||
|
|
||||||
players[i].bumpslow = READUINT8(save->p);
|
|
||||||
|
|
||||||
players[i].dashRingPullTics = READUINT8(save->p);
|
players[i].dashRingPullTics = READUINT8(save->p);
|
||||||
players[i].dashRingPushTics = READUINT8(save->p);
|
players[i].dashRingPushTics = READUINT8(save->p);
|
||||||
|
|
||||||
|
|
@ -1372,6 +1369,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
||||||
players[i].botvars.diffincrease = READUINT8(save->p);
|
players[i].botvars.diffincrease = READUINT8(save->p);
|
||||||
players[i].botvars.rival = (boolean)READUINT8(save->p);
|
players[i].botvars.rival = (boolean)READUINT8(save->p);
|
||||||
players[i].botvars.rubberband = READFIXED(save->p);
|
players[i].botvars.rubberband = READFIXED(save->p);
|
||||||
|
players[i].botvars.bumpslow = READUINT8(save->p);
|
||||||
players[i].botvars.itemdelay = READUINT32(save->p);
|
players[i].botvars.itemdelay = READUINT32(save->p);
|
||||||
players[i].botvars.itemconfirm = READUINT32(save->p);
|
players[i].botvars.itemconfirm = READUINT32(save->p);
|
||||||
players[i].botvars.turnconfirm = READSINT8(save->p);
|
players[i].botvars.turnconfirm = READSINT8(save->p);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue