mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-04 16:02:48 +00:00
Merge branch 'snifferbot-spectapalooza' into 'master'
Prevent bots from smelling spectators (resolves #238) Closes #238 See merge request KartKrew/Kart!1801
This commit is contained in:
commit
5a659d7a6c
2 changed files with 23 additions and 15 deletions
|
|
@ -542,21 +542,28 @@ static UINT32 K_BotRubberbandDistance(const player_t *player)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playeringame[i] && players[i].bot)
|
if (!playeringame[i] || players[i].spectator)
|
||||||
{
|
{
|
||||||
// First check difficulty levels, then score, then settle it with port priority!
|
continue;
|
||||||
if (player->botvars.difficulty < players[i].botvars.difficulty)
|
}
|
||||||
{
|
|
||||||
pos += 3;
|
if (!players[i].bot)
|
||||||
}
|
{
|
||||||
else if (player->score < players[i].score)
|
continue;
|
||||||
{
|
}
|
||||||
pos += 2;
|
|
||||||
}
|
// First check difficulty levels, then score, then settle it with port priority!
|
||||||
else if (i < portpriority)
|
if (player->botvars.difficulty < players[i].botvars.difficulty)
|
||||||
{
|
{
|
||||||
pos += 1;
|
pos += 3;
|
||||||
}
|
}
|
||||||
|
else if (player->score < players[i].score)
|
||||||
|
{
|
||||||
|
pos += 2;
|
||||||
|
}
|
||||||
|
else if (i < portpriority)
|
||||||
|
{
|
||||||
|
pos += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -543,6 +543,7 @@ static BlockItReturn_t K_FindObjectsForNudging(mobj_t *thing)
|
||||||
break;
|
break;
|
||||||
case MT_PLAYER:
|
case MT_PLAYER:
|
||||||
if (thing->player
|
if (thing->player
|
||||||
|
&& !thing->player->spectator
|
||||||
&& !thing->player->hyudorotimer
|
&& !thing->player->hyudorotimer
|
||||||
&& !g_nudgeSearch.botmo->player->hyudorotimer)
|
&& !g_nudgeSearch.botmo->player->hyudorotimer)
|
||||||
{
|
{
|
||||||
|
|
@ -902,7 +903,7 @@ static BlockItReturn_t K_FindPlayersToBully(mobj_t *thing)
|
||||||
return BMIT_CONTINUE;
|
return BMIT_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!thing->player)
|
if (!thing->player || thing->player->spectator)
|
||||||
{
|
{
|
||||||
return BMIT_CONTINUE;
|
return BMIT_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue