mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-22 02:00:11 +00:00
Merge branch 'v2-master' into followme-internal
This commit is contained in:
commit
fb978f9b91
5 changed files with 43 additions and 7 deletions
|
|
@ -469,6 +469,10 @@ boolean K_BHeapPop(bheap_t *const heap, bheapitem_t *const returnitemstorage)
|
|||
heap->array[0] = heap->array[heap->count];
|
||||
heap->array[0].heapindex = 0U;
|
||||
memset(&heap->array[heap->count], 0x00, sizeof(bheapitem_t));
|
||||
if (heap->array[0].indexchanged != NULL)
|
||||
{
|
||||
heap->array[0].indexchanged(heap->array[0].data, heap->array[0].heapindex);
|
||||
}
|
||||
|
||||
K_BHeapSortDown(heap, &heap->array[0]);
|
||||
popsuccess = true;
|
||||
|
|
|
|||
|
|
@ -2121,7 +2121,7 @@ fixed_t K_GetKartAccel(player_t *player)
|
|||
//k_accel += 3 * (9 - kartspeed); // 36 - 60
|
||||
k_accel += 4 * (9 - kartspeed); // 32 - 64
|
||||
|
||||
|
||||
|
||||
if (K_PlayerUsesBotMovement(player))
|
||||
{
|
||||
// Rubberbanding acceleration is waekened since it makes hits feel more meaningful
|
||||
|
|
@ -4027,7 +4027,7 @@ void K_DoSneaker(player_t *player, INT32 type)
|
|||
{
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
K_PlayBoostTaunt(player->mo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
player->kartstuff[k_sneakertimer] = sneakertime;
|
||||
|
|
@ -6702,7 +6702,7 @@ static INT32 K_FlameShieldMax(player_t *player)
|
|||
}
|
||||
|
||||
disttofinish = player->distancetofinish - disttofinish;
|
||||
distv = FixedDiv(distv * FRACUNIT, mapobjectscale) / FRACUNIT;
|
||||
distv = FixedMul(distv * FRACUNIT, mapobjectscale) / FRACUNIT;
|
||||
return min(16, 1 + (disttofinish / distv));
|
||||
}
|
||||
|
||||
|
|
@ -10048,7 +10048,7 @@ static void K_drawKartNameTags(void)
|
|||
{
|
||||
bary += (vid.height - (BASEVIDHEIGHT * vid.dupy)) / 2;
|
||||
}
|
||||
|
||||
|
||||
// Lat: 10/06/2020: colormap can be NULL on the frame you join a game, just arbitrarily use palette indexes 31 and 0 instead of whatever the colormap would give us instead to avoid crashes.
|
||||
V_DrawFill(barx, bary, barw, (3 * vid.dupy), (colormap ? colormap[31] : 31)|V_NOSCALESTART);
|
||||
V_DrawFill(barx, bary + vid.dupy, barw, vid.dupy, (colormap ? colormap[0] : 0)|V_NOSCALESTART);
|
||||
|
|
|
|||
|
|
@ -472,13 +472,44 @@ boolean K_PathfindAStar(path_t *const path, pathfindsetup_t *const pathfindsetup
|
|||
// Reallocate nodesarray if it's full
|
||||
if (nodesarraycount >= pathfindsetup->nodesarraycapacity)
|
||||
{
|
||||
pathfindnode_t *nodesarrayrealloc = NULL;
|
||||
pathfindsetup->nodesarraycapacity = pathfindsetup->nodesarraycapacity * 2;
|
||||
nodesarray = Z_Realloc(nodesarray, pathfindsetup->nodesarraycapacity * sizeof(pathfindnode_t), PU_STATIC, NULL);
|
||||
nodesarrayrealloc = Z_Realloc(nodesarray, pathfindsetup->nodesarraycapacity * sizeof(pathfindnode_t), PU_STATIC, NULL);
|
||||
|
||||
if (nodesarray == NULL)
|
||||
if (nodesarrayrealloc == NULL)
|
||||
{
|
||||
I_Error("K_PathfindAStar: Out of memory reallocating nodes array.");
|
||||
}
|
||||
|
||||
// Need to update pointers in closedset, openset, and node "camefrom" if nodesarray moved.
|
||||
if (nodesarray != nodesarrayrealloc)
|
||||
{
|
||||
size_t i = 0U;
|
||||
size_t arrayindex = 0U;
|
||||
for (i = 0U; i < closedsetcount; i++)
|
||||
{
|
||||
arrayindex = closedset[i] - nodesarray;
|
||||
closedset[i] = &nodesarrayrealloc[arrayindex];
|
||||
}
|
||||
for (i = 0U; i < openset.count; i++)
|
||||
{
|
||||
arrayindex = ((pathfindnode_t *)(openset.array[i].data)) - nodesarray;
|
||||
openset.array[i].data = &nodesarrayrealloc[arrayindex];
|
||||
}
|
||||
for (i = 0U; i < nodesarraycount; i++)
|
||||
{
|
||||
if (nodesarrayrealloc[i].camefrom != NULL)
|
||||
{
|
||||
arrayindex = nodesarrayrealloc[i].camefrom - nodesarray;
|
||||
nodesarrayrealloc[i].camefrom = &nodesarrayrealloc[arrayindex];
|
||||
}
|
||||
}
|
||||
|
||||
arrayindex = currentnode - nodesarray;
|
||||
currentnode = &nodesarrayrealloc[arrayindex];
|
||||
}
|
||||
|
||||
nodesarray = nodesarrayrealloc;
|
||||
}
|
||||
|
||||
// Create the new node and add it to the nodes array and open set
|
||||
|
|
|
|||
|
|
@ -5700,7 +5700,7 @@ static void M_DrawReplayStartMenu(void)
|
|||
// Lat: 08/06/2020: For some reason missing skins have their value set to 255 (don't even ask me why I didn't write this)
|
||||
// and for an even STRANGER reason this passes the first check below, so we're going to make sure that the skin here ISN'T 255 before we do anything stupid.
|
||||
|
||||
if (demolist[dir_on[menudepthleft]].standings[0].skin != 0xFF && W_CheckNumForName(skins[demolist[dir_on[menudepthleft]].standings[i].skin].facerank) != LUMPERROR)
|
||||
if (demolist[dir_on[menudepthleft]].standings[i].skin != 0xFF && W_CheckNumForName(skins[demolist[dir_on[menudepthleft]].standings[i].skin].facerank) != LUMPERROR)
|
||||
{
|
||||
patch = facerankprefix[demolist[dir_on[menudepthleft]].standings[i].skin];
|
||||
colormap = R_GetTranslationColormap(
|
||||
|
|
|
|||
|
|
@ -1879,6 +1879,7 @@ void V_DrawStringScaled(
|
|||
|
||||
chw <<= FRACBITS;
|
||||
spacew <<= FRACBITS;
|
||||
lfh <<= FRACBITS;
|
||||
|
||||
#define Mul( id, scale ) ( id = FixedMul (scale, id) )
|
||||
Mul (chw, scale);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue