mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'bots-flame-shield' into 'master'
Fix bot Flame Shield See merge request KartKrew/Kart!1775
This commit is contained in:
commit
94b2711e30
3 changed files with 72 additions and 8 deletions
|
|
@ -1931,7 +1931,14 @@ void K_UpdateBotGameplayVars(player_t *player)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->botvars.spindashconfirm += player->cmd.bot.spindashconfirm;
|
if (player->cmd.bot.spindashconfirm < 0 && abs(player->cmd.bot.spindashconfirm) > player->botvars.spindashconfirm)
|
||||||
|
{
|
||||||
|
player->botvars.spindashconfirm = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player->botvars.spindashconfirm += player->cmd.bot.spindashconfirm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (K_TryRingShooter(player) == true)
|
if (K_TryRingShooter(player) == true)
|
||||||
|
|
|
||||||
|
|
@ -1812,13 +1812,71 @@ void K_UpdateBotGameplayVarsItemUsage(player_t *player)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
player->botvars.itemconfirm += player->cmd.bot.itemconfirm;
|
if (player->cmd.bot.itemconfirm < 0 && abs(player->cmd.bot.itemconfirm) > player->botvars.itemconfirm)
|
||||||
|
|
||||||
if (player->itemRoulette.active == true)
|
|
||||||
{
|
{
|
||||||
// Mashing behaviors
|
player->botvars.itemconfirm = 0;
|
||||||
K_UpdateBotGameplayVarsItemUsageMash(player);
|
}
|
||||||
return;
|
else
|
||||||
|
{
|
||||||
|
player->botvars.itemconfirm += player->cmd.bot.itemconfirm;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player->itemflags & IF_USERINGS)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (player->itemRoulette.active == true)
|
||||||
|
{
|
||||||
|
// Mashing behaviors
|
||||||
|
K_UpdateBotGameplayVarsItemUsageMash(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player->stealingtimer == 0)
|
||||||
|
{
|
||||||
|
if (player->eggmanexplode)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else if (player->itemflags & IF_EGGMANOUT)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else if (player->rocketsneakertimer > 0)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (player->itemtype)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case KITEM_FLAMESHIELD:
|
||||||
|
{
|
||||||
|
if (player->botvars.itemconfirm == 0
|
||||||
|
&& (player->itemflags & IF_HOLDREADY) == IF_HOLDREADY)
|
||||||
|
{
|
||||||
|
INT32 flamemax = player->flamelength;
|
||||||
|
|
||||||
|
if (player->flamemeter < flamemax || flamemax == 0)
|
||||||
|
{
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player->botvars.itemconfirm = (3 * flamemax / 4) + (TICRATE / 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12288,7 +12288,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->itemflags |= IF_HOLDREADY;
|
player->itemflags |= IF_HOLDREADY;
|
||||||
player->botvars.itemconfirm = 3*flamemax/4;
|
|
||||||
|
|
||||||
if (!(gametyperules & GTR_CLOSERPLAYERS) || leveltime % 6 == 0)
|
if (!(gametyperules & GTR_CLOSERPLAYERS) || leveltime % 6 == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue