Actually fix mickey mouse glitch
This commit is contained in:
parent
066b5f461f
commit
20d98b5f84
2 changed files with 10 additions and 44 deletions
|
|
@ -548,7 +548,7 @@ void K_RetireBots(void)
|
||||||
const UINT8 defaultbotskin = K_BotDefaultSkin();
|
const UINT8 defaultbotskin = K_BotDefaultSkin();
|
||||||
SINT8 newDifficulty;
|
SINT8 newDifficulty;
|
||||||
|
|
||||||
UINT8 usableskins, skincount = numskins;
|
UINT8 usableskins = 0, skincount = numskins;
|
||||||
UINT8 grabskins[MAXSKINS+1];
|
UINT8 grabskins[MAXSKINS+1];
|
||||||
|
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
@ -562,30 +562,25 @@ void K_RetireBots(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init usable bot skins list
|
// Init usable bot skins list
|
||||||
for (usableskins = 0; usableskins < skincount; usableskins++)
|
for (i = 0; i < skincount; i++)
|
||||||
{
|
{
|
||||||
grabskins[usableskins] = usableskins;
|
grabskins[usableskins++] = i;
|
||||||
}
|
}
|
||||||
grabskins[usableskins] = MAXSKINS;
|
grabskins[usableskins] = MAXSKINS;
|
||||||
|
|
||||||
// Exclude player skins
|
|
||||||
for (i = 0; i < MAXPLAYERS; i++)
|
|
||||||
{
|
|
||||||
if (!playeringame[i])
|
|
||||||
continue;
|
|
||||||
if (players[i].spectator)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
grabskins[players[i].skin] = MAXSKINS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rearrange usable bot skins list to prevent gaps for randomised selection
|
// Rearrange usable bot skins list to prevent gaps for randomised selection
|
||||||
for (i = 0; i < usableskins; i++)
|
for (i = 0; i < usableskins; i++)
|
||||||
{
|
{
|
||||||
if (!(grabskins[i] == MAXSKINS || !R_SkinUsable(-1, grabskins[i])))
|
if (!(grabskins[i] == MAXSKINS || !R_SkinUsable(-1, grabskins[i])))
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
while (usableskins > i && (grabskins[usableskins] == MAXSKINS || !R_SkinUsable(-1, grabskins[usableskins])))
|
while (usableskins > i && (grabskins[usableskins] == MAXSKINS || !R_SkinUsable(-1, grabskins[usableskins])))
|
||||||
|
{
|
||||||
usableskins--;
|
usableskins--;
|
||||||
|
}
|
||||||
|
|
||||||
grabskins[i] = grabskins[usableskins];
|
grabskins[i] = grabskins[usableskins];
|
||||||
grabskins[usableskins] = MAXSKINS;
|
grabskins[usableskins] = MAXSKINS;
|
||||||
}
|
}
|
||||||
|
|
@ -654,7 +649,7 @@ void K_RetireBots(void)
|
||||||
{
|
{
|
||||||
UINT8 index = P_RandomKey(usableskins);
|
UINT8 index = P_RandomKey(usableskins);
|
||||||
skinnum = grabskins[index];
|
skinnum = grabskins[index];
|
||||||
if (((cv_ingamecap.value > 0) && (usableskins+1 >= cv_ingamecap.value)) || (usableskins+1 >= cv_maxplayers.value))
|
if (usableskins+1 >= K_GetGPPlayerCount(1))
|
||||||
{
|
{
|
||||||
grabskins[index] = grabskins[--usableskins];
|
grabskins[index] = grabskins[--usableskins];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -664,35 +664,6 @@ void Y_IntermissionDrawer(void)
|
||||||
|
|
||||||
y2 = y;
|
y2 = y;
|
||||||
|
|
||||||
if ((netgame || (demo.playback && demo.netgame)) && playerconsole[data.num[i]] == 0 && server_lagless && !players[data.num[i]].bot)
|
|
||||||
{
|
|
||||||
static int alagles_timer = 0;
|
|
||||||
patch_t *alagles;
|
|
||||||
|
|
||||||
y2 = ( y - 4 );
|
|
||||||
|
|
||||||
V_DrawScaledPatch(x + 36, y2, 0, W_CachePatchName(va("BLAGLES%d", (intertic / 3) % 6), PU_CACHE));
|
|
||||||
// every 70 tics
|
|
||||||
if (( leveltime % 70 ) == 0)
|
|
||||||
{
|
|
||||||
alagles_timer = 9;
|
|
||||||
}
|
|
||||||
if (alagles_timer > 0)
|
|
||||||
{
|
|
||||||
alagles = W_CachePatchName(va("ALAGLES%d", alagles_timer), PU_CACHE);
|
|
||||||
V_DrawScaledPatch(x + 36, y2, 0, alagles);
|
|
||||||
if (( leveltime % 2 ) == 0)
|
|
||||||
alagles_timer--;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
alagles = W_CachePatchName("ALAGLES0", PU_CACHE);
|
|
||||||
V_DrawScaledPatch(x + 36, y2, 0, alagles);
|
|
||||||
}
|
|
||||||
|
|
||||||
y2 += SHORT (alagles->height) + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.numplayers > NUMFORNEWCOLUMN)
|
if (data.numplayers > NUMFORNEWCOLUMN)
|
||||||
V_DrawThinString(x+36, y2-1, ((data.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime);
|
V_DrawThinString(x+36, y2-1, ((data.num[i] == whiteplayer) ? hilicol : 0)|V_ALLOWLOWERCASE|V_6WIDTHSPACE, strtime);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue