mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-25 17:32:27 +00:00
Fixing and cleaning rocket sneaker boost state separation shit
- Fixed rocket sneaker tripwire state not activating - Exposed sneaker boost variables to lua - Made bots at least aware of the new sneaker boost type...? Probably.
This commit is contained in:
parent
78652200f6
commit
333734fdf3
3 changed files with 13 additions and 4 deletions
|
|
@ -531,7 +531,7 @@ static void K_BotItemSneaker(const player_t *player, ticcmd_t *cmd)
|
|||
|| player->speedboost > (FRACUNIT/8) // Have another type of boost (tethering)
|
||||
|| player->botvars.itemconfirm > 4*TICRATE) // Held onto it for too long
|
||||
{
|
||||
if (player->sneakertimer == 0 && K_ItemButtonWasDown(player) == false)
|
||||
if (player->sneakertimer == 0 && player->weaksneakertimer == 0 && K_ItemButtonWasDown(player) == false)
|
||||
{
|
||||
cmd->buttons |= BT_ATTACK;
|
||||
//player->botvars.itemconfirm = 2*TICRATE;
|
||||
|
|
@ -567,7 +567,7 @@ static void K_BotItemRocketSneaker(const player_t *player, ticcmd_t *cmd)
|
|||
|
||||
if (player->botvars.itemconfirm > TICRATE)
|
||||
{
|
||||
if (player->sneakertimer == 0 && K_ItemButtonWasDown(player) == false)
|
||||
if (player->sneakertimer == 0 && player->weaksneakertimer == 0 && K_ItemButtonWasDown(player) == false)
|
||||
{
|
||||
cmd->buttons |= BT_ATTACK;
|
||||
//player->botvars.itemconfirm = 0;
|
||||
|
|
@ -1605,7 +1605,7 @@ static void K_BotItemIceCube(const player_t *player, ticcmd_t *cmd)
|
|||
return;
|
||||
}
|
||||
|
||||
if (player->sneakertimer)
|
||||
if (player->sneakertimer || player->weaksneakertimer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3071,7 +3071,8 @@ tripwirepass_t K_TripwirePassConditions(const player_t *player)
|
|||
{
|
||||
if (
|
||||
player->invincibilitytimer ||
|
||||
player->sneakertimer
|
||||
player->sneakertimer ||
|
||||
player->weaksneakertimer
|
||||
)
|
||||
return TRIPWIRE_BLASTER;
|
||||
|
||||
|
|
|
|||
|
|
@ -1124,6 +1124,14 @@ static int player_set(lua_State *L)
|
|||
plr->sneakertimer = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"numsneakers"))
|
||||
plr->numsneakers = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"panelsneakertimer"))
|
||||
plr->panelsneakertimer = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"numpanelsneakers"))
|
||||
plr->numpanelsneakers = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"weaksneakertimer"))
|
||||
plr->weaksneakertimer = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"numpweaksneakers"))
|
||||
plr->numweaksneakers = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"floorboost"))
|
||||
plr->floorboost = luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"growshrinktimer"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue