mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Very minor fix to WRONG WAY
More opaque waypoint markers for kartdebugwaypoints Looks like whitespace got murdered in k_kart.c again
This commit is contained in:
parent
738d1f1940
commit
e874af3e43
2 changed files with 355 additions and 343 deletions
695
src/k_kart.c
695
src/k_kart.c
|
|
@ -2217,44 +2217,44 @@ void K_RespawnChecker(player_t *player)
|
||||||
S_StartSound(player->mo, sfx_s23c);
|
S_StartSound(player->mo, sfx_s23c);
|
||||||
player->kartstuff[k_startboost] = 50;
|
player->kartstuff[k_startboost] = 50;
|
||||||
K_SpawnDashDustRelease(player);
|
K_SpawnDashDustRelease(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
player->mo->colorized = false;
|
player->mo->colorized = false;
|
||||||
player->kartstuff[k_dropdash] = 0;
|
player->kartstuff[k_dropdash] = 0;
|
||||||
player->kartstuff[k_respawn] = 0;
|
player->kartstuff[k_respawn] = 0;
|
||||||
|
|
||||||
//P_PlayRinglossSound(player->mo);
|
//P_PlayRinglossSound(player->mo);
|
||||||
P_PlayerRingBurst(player, 3);
|
P_PlayerRingBurst(player, 3);
|
||||||
|
|
||||||
if (G_BattleGametype())
|
if (G_BattleGametype())
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_bumper] > 0)
|
if (player->kartstuff[k_bumper] > 0)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_bumper] == 1)
|
if (player->kartstuff[k_bumper] == 1)
|
||||||
{
|
{
|
||||||
mobj_t *karmahitbox = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_KARMAHITBOX); // Player hitbox is too small!!
|
mobj_t *karmahitbox = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_KARMAHITBOX); // Player hitbox is too small!!
|
||||||
P_SetTarget(&karmahitbox->target, player->mo);
|
P_SetTarget(&karmahitbox->target, player->mo);
|
||||||
karmahitbox->destscale = player->mo->scale;
|
karmahitbox->destscale = player->mo->scale;
|
||||||
P_SetScale(karmahitbox, player->mo->scale);
|
P_SetScale(karmahitbox, player->mo->scale);
|
||||||
CONS_Printf(M_GetText("%s lost all of their bumpers!\n"), player_names[player-players]);
|
CONS_Printf(M_GetText("%s lost all of their bumpers!\n"), player_names[player-players]);
|
||||||
}
|
}
|
||||||
player->kartstuff[k_bumper]--;
|
player->kartstuff[k_bumper]--;
|
||||||
if (K_IsPlayerWanted(player))
|
if (K_IsPlayerWanted(player))
|
||||||
K_CalculateBattleWanted();
|
K_CalculateBattleWanted();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player->kartstuff[k_bumper])
|
if (!player->kartstuff[k_bumper])
|
||||||
{
|
{
|
||||||
player->kartstuff[k_comebacktimer] = comebacktime;
|
player->kartstuff[k_comebacktimer] = comebacktime;
|
||||||
if (player->kartstuff[k_comebackmode] == 2)
|
if (player->kartstuff[k_comebackmode] == 2)
|
||||||
{
|
{
|
||||||
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
|
mobj_t *poof = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EXPLODE);
|
||||||
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
|
S_StartSound(poof, mobjinfo[MT_KARMAHITBOX].seesound);
|
||||||
player->kartstuff[k_comebackmode] = 0;
|
player->kartstuff[k_comebackmode] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
K_CheckBumpers();
|
K_CheckBumpers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5566,25 +5566,25 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
player->mo->colorized = false;
|
player->mo->colorized = false;
|
||||||
player->mo->color = player->skincolor;
|
player->mo->color = player->skincolor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player->kartstuff[k_killfield]) // You're gonna REALLY diiiiie
|
else if (player->kartstuff[k_killfield]) // You're gonna REALLY diiiiie
|
||||||
{
|
{
|
||||||
const INT32 flashtime = 4<<(4-(player->kartstuff[k_killfield]/TICRATE));
|
const INT32 flashtime = 4<<(4-(player->kartstuff[k_killfield]/TICRATE));
|
||||||
if (player->kartstuff[k_killfield] == 1 || (player->kartstuff[k_killfield] % (flashtime/2) != 0))
|
if (player->kartstuff[k_killfield] == 1 || (player->kartstuff[k_killfield] % (flashtime/2) != 0))
|
||||||
{
|
{
|
||||||
player->mo->colorized = false;
|
player->mo->colorized = false;
|
||||||
player->mo->color = player->skincolor;
|
player->mo->color = player->skincolor;
|
||||||
}
|
}
|
||||||
else if (player->kartstuff[k_killfield] % flashtime == 0)
|
else if (player->kartstuff[k_killfield] % flashtime == 0)
|
||||||
{
|
{
|
||||||
player->mo->colorized = true;
|
player->mo->colorized = true;
|
||||||
player->mo->color = SKINCOLOR_BYZANTIUM;
|
player->mo->color = SKINCOLOR_BYZANTIUM;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
player->mo->colorized = true;
|
player->mo->colorized = true;
|
||||||
player->mo->color = SKINCOLOR_RUBY;
|
player->mo->color = SKINCOLOR_RUBY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player->kartstuff[k_ringboost] && (leveltime & 1)) // ring boosting
|
else if (player->kartstuff[k_ringboost] && (leveltime & 1)) // ring boosting
|
||||||
{
|
{
|
||||||
|
|
@ -5764,27 +5764,27 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
K_KartPlayerHUDUpdate(player);
|
K_KartPlayerHUDUpdate(player);
|
||||||
|
|
||||||
if (G_BattleGametype() && player->kartstuff[k_bumper] > 0
|
if (G_BattleGametype() && player->kartstuff[k_bumper] > 0
|
||||||
&& !player->kartstuff[k_spinouttimer] && !player->kartstuff[k_squishedtimer]
|
&& !player->kartstuff[k_spinouttimer] && !player->kartstuff[k_squishedtimer]
|
||||||
&& !player->kartstuff[k_respawn] && !player->powers[pw_flashing])
|
&& !player->kartstuff[k_respawn] && !player->powers[pw_flashing])
|
||||||
{
|
{
|
||||||
player->kartstuff[k_wanted]++;
|
player->kartstuff[k_wanted]++;
|
||||||
if (battleovertime.enabled >= 10*TICRATE)
|
if (battleovertime.enabled >= 10*TICRATE)
|
||||||
{
|
{
|
||||||
if (P_AproxDistance(player->mo->x - battleovertime.x, player->mo->y - battleovertime.y) > battleovertime.radius)
|
if (P_AproxDistance(player->mo->x - battleovertime.x, player->mo->y - battleovertime.y) > battleovertime.radius)
|
||||||
{
|
{
|
||||||
player->kartstuff[k_killfield]++;
|
player->kartstuff[k_killfield]++;
|
||||||
if (player->kartstuff[k_killfield] > 4*TICRATE)
|
if (player->kartstuff[k_killfield] > 4*TICRATE)
|
||||||
{
|
{
|
||||||
K_SpinPlayer(player, NULL, 0, NULL, false);
|
K_SpinPlayer(player, NULL, 0, NULL, false);
|
||||||
//player->kartstuff[k_killfield] = 1;
|
//player->kartstuff[k_killfield] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player->kartstuff[k_killfield] > 0)
|
else if (player->kartstuff[k_killfield] > 0)
|
||||||
player->kartstuff[k_killfield]--;
|
player->kartstuff[k_killfield]--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (player->kartstuff[k_killfield] > 0)
|
else if (player->kartstuff[k_killfield] > 0)
|
||||||
player->kartstuff[k_killfield]--;
|
player->kartstuff[k_killfield]--;
|
||||||
|
|
||||||
if (P_IsObjectOnGround(player->mo))
|
if (P_IsObjectOnGround(player->mo))
|
||||||
|
|
@ -6012,8 +6012,14 @@ static waypoint_t *K_GetPlayerNextWaypoint(player_t *player)
|
||||||
{
|
{
|
||||||
bestwaypoint = waypoint->nextwaypoints[i];
|
bestwaypoint = waypoint->nextwaypoints[i];
|
||||||
|
|
||||||
nextbestdelta = angledelta;
|
if (angledelta < nextbestdelta)
|
||||||
nextbestmomdelta = momdelta;
|
{
|
||||||
|
nextbestdelta = angledelta;
|
||||||
|
}
|
||||||
|
if (momdelta < nextbestmomdelta)
|
||||||
|
{
|
||||||
|
nextbestmomdelta = momdelta;
|
||||||
|
}
|
||||||
|
|
||||||
// Remove wrong way flag if we're using nextwaypoints
|
// Remove wrong way flag if we're using nextwaypoints
|
||||||
player->kartstuff[k_wrongway] = 0;
|
player->kartstuff[k_wrongway] = 0;
|
||||||
|
|
@ -6049,7 +6055,7 @@ static waypoint_t *K_GetPlayerNextWaypoint(player_t *player)
|
||||||
nextbestdelta = angledelta;
|
nextbestdelta = angledelta;
|
||||||
nextbestmomdelta = momdelta;
|
nextbestmomdelta = momdelta;
|
||||||
|
|
||||||
// Ser wrong way flag if we're using prevwaypoints
|
// Set wrong way flag if we're using prevwaypoints
|
||||||
player->kartstuff[k_wrongway] = 1;
|
player->kartstuff[k_wrongway] = 1;
|
||||||
updaterespawn = false;
|
updaterespawn = false;
|
||||||
}
|
}
|
||||||
|
|
@ -7811,7 +7817,7 @@ static patch_t *kp_lapanim_number[10][3];
|
||||||
static patch_t *kp_lapanim_emblem[2];
|
static patch_t *kp_lapanim_emblem[2];
|
||||||
static patch_t *kp_lapanim_hand[3];
|
static patch_t *kp_lapanim_hand[3];
|
||||||
|
|
||||||
static patch_t *kp_yougotem;
|
static patch_t *kp_yougotem;
|
||||||
static patch_t *kp_itemminimap;
|
static patch_t *kp_itemminimap;
|
||||||
|
|
||||||
static patch_t *kp_alagles[10];
|
static patch_t *kp_alagles[10];
|
||||||
|
|
@ -8117,7 +8123,7 @@ void K_LoadKartHUDGraphics(void)
|
||||||
kp_lapanim_hand[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
|
kp_lapanim_hand[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
|
||||||
}
|
}
|
||||||
|
|
||||||
kp_yougotem = (patch_t *) W_CachePatchName("YOUGOTEM", PU_HUDGFX);
|
kp_yougotem = (patch_t *) W_CachePatchName("YOUGOTEM", PU_HUDGFX);
|
||||||
kp_itemminimap = (patch_t *) W_CachePatchName("MMAPITEM", PU_HUDGFX);
|
kp_itemminimap = (patch_t *) W_CachePatchName("MMAPITEM", PU_HUDGFX);
|
||||||
|
|
||||||
sprintf(buffer, "ALAGLESx");
|
sprintf(buffer, "ALAGLESx");
|
||||||
|
|
@ -9682,247 +9688,247 @@ static void K_drawKartPlayerCheck(void)
|
||||||
V_DrawMappedPatch(x, CHEK_Y, V_HUDTRANS|splitflags, kp_check[pnum], colormap);
|
V_DrawMappedPatch(x, CHEK_Y, V_HUDTRANS|splitflags, kp_check[pnum], colormap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartMinimapIcon(fixed_t objx, fixed_t objy, INT32 hudx, INT32 hudy, INT32 flags, patch_t *icon, UINT8 *colormap, patch_t *AutomapPic)
|
static void K_drawKartMinimapIcon(fixed_t objx, fixed_t objy, INT32 hudx, INT32 hudy, INT32 flags, patch_t *icon, UINT8 *colormap, patch_t *AutomapPic)
|
||||||
{
|
{
|
||||||
// amnum xpos & ypos are the icon's speed around the HUD.
|
// amnum xpos & ypos are the icon's speed around the HUD.
|
||||||
// The number being divided by is for how fast it moves.
|
// The number being divided by is for how fast it moves.
|
||||||
// The higher the number, the slower it moves.
|
// The higher the number, the slower it moves.
|
||||||
|
|
||||||
// am xpos & ypos are the icon's starting position. Withouht
|
// am xpos & ypos are the icon's starting position. Withouht
|
||||||
// it, they wouldn't 'spawn' on the top-right side of the HUD.
|
// it, they wouldn't 'spawn' on the top-right side of the HUD.
|
||||||
|
|
||||||
fixed_t amnumxpos, amnumypos;
|
fixed_t amnumxpos, amnumypos;
|
||||||
INT32 amxpos, amypos;
|
INT32 amxpos, amypos;
|
||||||
|
|
||||||
node_t *bsp = &nodes[numnodes-1];
|
node_t *bsp = &nodes[numnodes-1];
|
||||||
fixed_t maxx, minx, maxy, miny;
|
fixed_t maxx, minx, maxy, miny;
|
||||||
|
|
||||||
fixed_t mapwidth, mapheight;
|
fixed_t mapwidth, mapheight;
|
||||||
fixed_t xoffset, yoffset;
|
fixed_t xoffset, yoffset;
|
||||||
fixed_t xscale, yscale, zoom;
|
fixed_t xscale, yscale, zoom;
|
||||||
|
|
||||||
maxx = maxy = INT32_MAX;
|
maxx = maxy = INT32_MAX;
|
||||||
minx = miny = INT32_MIN;
|
minx = miny = INT32_MIN;
|
||||||
minx = bsp->bbox[0][BOXLEFT];
|
minx = bsp->bbox[0][BOXLEFT];
|
||||||
maxx = bsp->bbox[0][BOXRIGHT];
|
maxx = bsp->bbox[0][BOXRIGHT];
|
||||||
miny = bsp->bbox[0][BOXBOTTOM];
|
miny = bsp->bbox[0][BOXBOTTOM];
|
||||||
maxy = bsp->bbox[0][BOXTOP];
|
maxy = bsp->bbox[0][BOXTOP];
|
||||||
|
|
||||||
if (bsp->bbox[1][BOXLEFT] < minx)
|
if (bsp->bbox[1][BOXLEFT] < minx)
|
||||||
minx = bsp->bbox[1][BOXLEFT];
|
minx = bsp->bbox[1][BOXLEFT];
|
||||||
if (bsp->bbox[1][BOXRIGHT] > maxx)
|
if (bsp->bbox[1][BOXRIGHT] > maxx)
|
||||||
maxx = bsp->bbox[1][BOXRIGHT];
|
maxx = bsp->bbox[1][BOXRIGHT];
|
||||||
if (bsp->bbox[1][BOXBOTTOM] < miny)
|
if (bsp->bbox[1][BOXBOTTOM] < miny)
|
||||||
miny = bsp->bbox[1][BOXBOTTOM];
|
miny = bsp->bbox[1][BOXBOTTOM];
|
||||||
if (bsp->bbox[1][BOXTOP] > maxy)
|
if (bsp->bbox[1][BOXTOP] > maxy)
|
||||||
maxy = bsp->bbox[1][BOXTOP];
|
maxy = bsp->bbox[1][BOXTOP];
|
||||||
|
|
||||||
// You might be wondering why these are being bitshift here
|
// You might be wondering why these are being bitshift here
|
||||||
// it's because mapwidth and height would otherwise overflow for maps larger than half the size possible...
|
// it's because mapwidth and height would otherwise overflow for maps larger than half the size possible...
|
||||||
// map boundaries and sizes will ALWAYS be whole numbers thankfully
|
// map boundaries and sizes will ALWAYS be whole numbers thankfully
|
||||||
// later calculations take into consideration that these are actually not in terms of FRACUNIT though
|
// later calculations take into consideration that these are actually not in terms of FRACUNIT though
|
||||||
minx >>= FRACBITS;
|
minx >>= FRACBITS;
|
||||||
maxx >>= FRACBITS;
|
maxx >>= FRACBITS;
|
||||||
miny >>= FRACBITS;
|
miny >>= FRACBITS;
|
||||||
maxy >>= FRACBITS;
|
maxy >>= FRACBITS;
|
||||||
|
|
||||||
mapwidth = maxx - minx;
|
mapwidth = maxx - minx;
|
||||||
mapheight = maxy - miny;
|
mapheight = maxy - miny;
|
||||||
|
|
||||||
// These should always be small enough to be bitshift back right now
|
// These should always be small enough to be bitshift back right now
|
||||||
xoffset = (minx + mapwidth/2)<<FRACBITS;
|
xoffset = (minx + mapwidth/2)<<FRACBITS;
|
||||||
yoffset = (miny + mapheight/2)<<FRACBITS;
|
yoffset = (miny + mapheight/2)<<FRACBITS;
|
||||||
|
|
||||||
xscale = FixedDiv(AutomapPic->width, mapwidth);
|
xscale = FixedDiv(AutomapPic->width, mapwidth);
|
||||||
yscale = FixedDiv(AutomapPic->height, mapheight);
|
yscale = FixedDiv(AutomapPic->height, mapheight);
|
||||||
zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20);
|
zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20);
|
||||||
|
|
||||||
amnumxpos = (FixedMul(objx, zoom) - FixedMul(xoffset, zoom));
|
amnumxpos = (FixedMul(objx, zoom) - FixedMul(xoffset, zoom));
|
||||||
amnumypos = -(FixedMul(objy, zoom) - FixedMul(yoffset, zoom));
|
amnumypos = -(FixedMul(objy, zoom) - FixedMul(yoffset, zoom));
|
||||||
|
|
||||||
if (encoremode)
|
if (encoremode)
|
||||||
amnumxpos = -amnumxpos;
|
amnumxpos = -amnumxpos;
|
||||||
|
|
||||||
amxpos = amnumxpos + ((hudx + AutomapPic->width/2 - (icon->width/2))<<FRACBITS);
|
amxpos = amnumxpos + ((hudx + AutomapPic->width/2 - (icon->width/2))<<FRACBITS);
|
||||||
amypos = amnumypos + ((hudy + AutomapPic->height/2 - (icon->height/2))<<FRACBITS);
|
amypos = amnumypos + ((hudy + AutomapPic->height/2 - (icon->height/2))<<FRACBITS);
|
||||||
|
|
||||||
// do we want this? it feels unnecessary. easier to just modify the amnumxpos?
|
// do we want this? it feels unnecessary. easier to just modify the amnumxpos?
|
||||||
/*if (encoremode)
|
/*if (encoremode)
|
||||||
{
|
{
|
||||||
flags |= V_FLIP;
|
flags |= V_FLIP;
|
||||||
amxpos = -amnumxpos + ((hudx + AutomapPic->width/2 + (icon->width/2))<<FRACBITS);
|
amxpos = -amnumxpos + ((hudx + AutomapPic->width/2 + (icon->width/2))<<FRACBITS);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, icon, colormap);
|
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, icon, colormap);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartMinimap(void)
|
static void K_drawKartMinimap(void)
|
||||||
{
|
{
|
||||||
INT32 lumpnum;
|
INT32 lumpnum;
|
||||||
patch_t *AutomapPic;
|
patch_t *AutomapPic;
|
||||||
INT32 i = 0;
|
INT32 i = 0;
|
||||||
INT32 x, y;
|
INT32 x, y;
|
||||||
INT32 minimaptrans, splitflags = (splitscreen == 3 ? 0 : V_SNAPTORIGHT); // flags should only be 0 when it's centered (4p split)
|
INT32 minimaptrans, splitflags = (splitscreen == 3 ? 0 : V_SNAPTORIGHT); // flags should only be 0 when it's centered (4p split)
|
||||||
UINT8 skin = 0;
|
UINT8 skin = 0;
|
||||||
UINT8 *colormap = NULL;
|
UINT8 *colormap = NULL;
|
||||||
SINT8 localplayers[4];
|
SINT8 localplayers[4];
|
||||||
SINT8 numlocalplayers = 0;
|
SINT8 numlocalplayers = 0;
|
||||||
mobj_t *mobj, *next; // for SPB drawing (or any other item(s) we may wanna draw, I dunno!)
|
mobj_t *mobj, *next; // for SPB drawing (or any other item(s) we may wanna draw, I dunno!)
|
||||||
|
|
||||||
// Draw the HUD only when playing in a level.
|
// Draw the HUD only when playing in a level.
|
||||||
// hu_stuff needs this, unlike st_stuff.
|
// hu_stuff needs this, unlike st_stuff.
|
||||||
if (gamestate != GS_LEVEL)
|
if (gamestate != GS_LEVEL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Only draw for the first player
|
// Only draw for the first player
|
||||||
// Maybe move this somewhere else where this won't be a concern?
|
// Maybe move this somewhere else where this won't be a concern?
|
||||||
if (stplyr != &players[displayplayers[0]])
|
if (stplyr != &players[displayplayers[0]])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lumpnum = W_CheckNumForName(va("%sR", G_BuildMapName(gamemap)));
|
lumpnum = W_CheckNumForName(va("%sR", G_BuildMapName(gamemap)));
|
||||||
|
|
||||||
if (lumpnum != -1)
|
if (lumpnum != -1)
|
||||||
AutomapPic = W_CachePatchName(va("%sR", G_BuildMapName(gamemap)), PU_HUDGFX);
|
AutomapPic = W_CachePatchName(va("%sR", G_BuildMapName(gamemap)), PU_HUDGFX);
|
||||||
else
|
else
|
||||||
return; // no pic, just get outta here
|
return; // no pic, just get outta here
|
||||||
|
|
||||||
x = MINI_X - (AutomapPic->width/2);
|
x = MINI_X - (AutomapPic->width/2);
|
||||||
y = MINI_Y - (AutomapPic->height/2);
|
y = MINI_Y - (AutomapPic->height/2);
|
||||||
|
|
||||||
if (timeinmap > 105)
|
if (timeinmap > 105)
|
||||||
{
|
{
|
||||||
minimaptrans = cv_kartminimap.value;
|
minimaptrans = cv_kartminimap.value;
|
||||||
if (timeinmap <= 113)
|
if (timeinmap <= 113)
|
||||||
minimaptrans = ((((INT32)timeinmap) - 105)*minimaptrans)/(113-105);
|
minimaptrans = ((((INT32)timeinmap) - 105)*minimaptrans)/(113-105);
|
||||||
if (!minimaptrans)
|
if (!minimaptrans)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
minimaptrans = ((10-minimaptrans)<<FF_TRANSSHIFT);
|
minimaptrans = ((10-minimaptrans)<<FF_TRANSSHIFT);
|
||||||
splitflags |= minimaptrans;
|
splitflags |= minimaptrans;
|
||||||
|
|
||||||
if (encoremode)
|
if (encoremode)
|
||||||
V_DrawScaledPatch(x+(AutomapPic->width), y, splitflags|V_FLIP, AutomapPic);
|
V_DrawScaledPatch(x+(AutomapPic->width), y, splitflags|V_FLIP, AutomapPic);
|
||||||
else
|
else
|
||||||
V_DrawScaledPatch(x, y, splitflags, AutomapPic);
|
V_DrawScaledPatch(x, y, splitflags, AutomapPic);
|
||||||
|
|
||||||
if (!(splitscreen == 2))
|
if (!(splitscreen == 2))
|
||||||
{
|
{
|
||||||
splitflags &= ~minimaptrans;
|
splitflags &= ~minimaptrans;
|
||||||
splitflags |= V_HUDTRANSHALF;
|
splitflags |= V_HUDTRANSHALF;
|
||||||
}
|
}
|
||||||
|
|
||||||
// let offsets transfer to the heads, too!
|
// let offsets transfer to the heads, too!
|
||||||
if (encoremode)
|
if (encoremode)
|
||||||
x += SHORT(AutomapPic->leftoffset);
|
x += SHORT(AutomapPic->leftoffset);
|
||||||
else
|
else
|
||||||
x -= SHORT(AutomapPic->leftoffset);
|
x -= SHORT(AutomapPic->leftoffset);
|
||||||
y -= SHORT(AutomapPic->topoffset);
|
y -= SHORT(AutomapPic->topoffset);
|
||||||
|
|
||||||
// Draw the super item in Battle
|
// Draw the super item in Battle
|
||||||
if (G_BattleGametype() && battleovertime.enabled)
|
if (G_BattleGametype() && battleovertime.enabled)
|
||||||
{
|
{
|
||||||
if (battleovertime.enabled >= 10*TICRATE || (battleovertime.enabled & 1))
|
if (battleovertime.enabled >= 10*TICRATE || (battleovertime.enabled & 1))
|
||||||
{
|
{
|
||||||
const INT32 prevsplitflags = splitflags;
|
const INT32 prevsplitflags = splitflags;
|
||||||
splitflags &= ~V_HUDTRANSHALF;
|
splitflags &= ~V_HUDTRANSHALF;
|
||||||
splitflags |= V_HUDTRANS;
|
splitflags |= V_HUDTRANS;
|
||||||
colormap = R_GetTranslationColormap(TC_RAINBOW, (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))), GTC_CACHE);
|
colormap = R_GetTranslationColormap(TC_RAINBOW, (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))), GTC_CACHE);
|
||||||
K_drawKartMinimapIcon(battleovertime.x, battleovertime.y, x, y, splitflags, kp_itemminimap, colormap, AutomapPic);
|
K_drawKartMinimapIcon(battleovertime.x, battleovertime.y, x, y, splitflags, kp_itemminimap, colormap, AutomapPic);
|
||||||
splitflags = prevsplitflags;
|
splitflags = prevsplitflags;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize
|
// initialize
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
localplayers[i] = -1;
|
localplayers[i] = -1;
|
||||||
|
|
||||||
// Player's tiny icons on the Automap. (drawn opposite direction so player 1 is drawn last in splitscreen)
|
// Player's tiny icons on the Automap. (drawn opposite direction so player 1 is drawn last in splitscreen)
|
||||||
if (ghosts)
|
if (ghosts)
|
||||||
{
|
{
|
||||||
demoghost *g = ghosts;
|
demoghost *g = ghosts;
|
||||||
while (g)
|
while (g)
|
||||||
{
|
{
|
||||||
if (g->mo->skin)
|
if (g->mo->skin)
|
||||||
skin = ((skin_t*)g->mo->skin)-skins;
|
skin = ((skin_t*)g->mo->skin)-skins;
|
||||||
else
|
else
|
||||||
skin = 0;
|
skin = 0;
|
||||||
if (g->mo->color)
|
if (g->mo->color)
|
||||||
{
|
{
|
||||||
if (g->mo->colorized)
|
if (g->mo->colorized)
|
||||||
colormap = R_GetTranslationColormap(TC_RAINBOW, g->mo->color, GTC_CACHE);
|
colormap = R_GetTranslationColormap(TC_RAINBOW, g->mo->color, GTC_CACHE);
|
||||||
else
|
else
|
||||||
colormap = R_GetTranslationColormap(skin, g->mo->color, GTC_CACHE);
|
colormap = R_GetTranslationColormap(skin, g->mo->color, GTC_CACHE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
colormap = NULL;
|
colormap = NULL;
|
||||||
K_drawKartMinimapIcon(g->mo->x, g->mo->y, x, y, splitflags, facemmapprefix[skin], colormap, AutomapPic);
|
K_drawKartMinimapIcon(g->mo->x, g->mo->y, x, y, splitflags, facemmapprefix[skin], colormap, AutomapPic);
|
||||||
g = g->next;
|
g = g->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stplyr->mo || stplyr->spectator) // do we need the latter..?
|
if (!stplyr->mo || stplyr->spectator) // do we need the latter..?
|
||||||
return;
|
return;
|
||||||
|
|
||||||
localplayers[numlocalplayers] = stplyr-players;
|
localplayers[numlocalplayers] = stplyr-players;
|
||||||
numlocalplayers++;
|
numlocalplayers++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i = MAXPLAYERS-1; i >= 0; i--)
|
for (i = MAXPLAYERS-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (!playeringame[i])
|
if (!playeringame[i])
|
||||||
continue;
|
continue;
|
||||||
if (!players[i].mo || players[i].spectator)
|
if (!players[i].mo || players[i].spectator)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (i != displayplayers[0] || splitscreen)
|
if (i != displayplayers[0] || splitscreen)
|
||||||
{
|
{
|
||||||
if (G_BattleGametype() && players[i].kartstuff[k_bumper] <= 0)
|
if (G_BattleGametype() && players[i].kartstuff[k_bumper] <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (players[i].kartstuff[k_hyudorotimer] > 0)
|
if (players[i].kartstuff[k_hyudorotimer] > 0)
|
||||||
{
|
{
|
||||||
if (!((players[i].kartstuff[k_hyudorotimer] < 1*TICRATE/2
|
if (!((players[i].kartstuff[k_hyudorotimer] < 1*TICRATE/2
|
||||||
|| players[i].kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))
|
|| players[i].kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))
|
||||||
&& !(leveltime & 1)))
|
&& !(leveltime & 1)))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == displayplayers[0] || i == displayplayers[1] || i == displayplayers[2] || i == displayplayers[3])
|
if (i == displayplayers[0] || i == displayplayers[1] || i == displayplayers[2] || i == displayplayers[3])
|
||||||
{
|
{
|
||||||
// Draw display players on top of everything else
|
// Draw display players on top of everything else
|
||||||
localplayers[numlocalplayers] = i;
|
localplayers[numlocalplayers] = i;
|
||||||
numlocalplayers++;
|
numlocalplayers++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (players[i].mo->skin)
|
if (players[i].mo->skin)
|
||||||
skin = ((skin_t*)players[i].mo->skin)-skins;
|
skin = ((skin_t*)players[i].mo->skin)-skins;
|
||||||
else
|
else
|
||||||
skin = 0;
|
skin = 0;
|
||||||
|
|
||||||
if (players[i].mo->color)
|
if (players[i].mo->color)
|
||||||
{
|
{
|
||||||
if (players[i].mo->colorized)
|
if (players[i].mo->colorized)
|
||||||
colormap = R_GetTranslationColormap(TC_RAINBOW, players[i].mo->color, GTC_CACHE);
|
colormap = R_GetTranslationColormap(TC_RAINBOW, players[i].mo->color, GTC_CACHE);
|
||||||
else
|
else
|
||||||
colormap = R_GetTranslationColormap(skin, players[i].mo->color, GTC_CACHE);
|
colormap = R_GetTranslationColormap(skin, players[i].mo->color, GTC_CACHE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
colormap = NULL;
|
colormap = NULL;
|
||||||
|
|
||||||
K_drawKartMinimapIcon(players[i].mo->x, players[i].mo->y, x, y, splitflags, facemmapprefix[skin], colormap, AutomapPic);
|
K_drawKartMinimapIcon(players[i].mo->x, players[i].mo->y, x, y, splitflags, facemmapprefix[skin], colormap, AutomapPic);
|
||||||
// Target reticule
|
// Target reticule
|
||||||
if ((G_RaceGametype() && players[i].kartstuff[k_position] == spbplace)
|
if ((G_RaceGametype() && players[i].kartstuff[k_position] == spbplace)
|
||||||
|| (G_BattleGametype() && K_IsPlayerWanted(&players[i])))
|
|| (G_BattleGametype() && K_IsPlayerWanted(&players[i])))
|
||||||
K_drawKartMinimapIcon(players[i].mo->x, players[i].mo->y, x, y, splitflags, kp_wantedreticle, NULL, AutomapPic);
|
K_drawKartMinimapIcon(players[i].mo->x, players[i].mo->y, x, y, splitflags, kp_wantedreticle, NULL, AutomapPic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw SPB(s?)
|
// draw SPB(s?)
|
||||||
for (mobj = kitemcap; mobj; mobj = next)
|
for (mobj = kitemcap; mobj; mobj = next)
|
||||||
|
|
@ -9943,39 +9949,39 @@ static void K_drawKartMinimap(void)
|
||||||
K_drawKartMinimapIcon(mobj->x, mobj->y, x, y, splitflags, kp_spbminimap, colormap, AutomapPic);
|
K_drawKartMinimapIcon(mobj->x, mobj->y, x, y, splitflags, kp_spbminimap, colormap, AutomapPic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw our local players here, opaque.
|
// draw our local players here, opaque.
|
||||||
splitflags &= ~V_HUDTRANSHALF;
|
splitflags &= ~V_HUDTRANSHALF;
|
||||||
splitflags |= V_HUDTRANS;
|
splitflags |= V_HUDTRANS;
|
||||||
|
|
||||||
for (i = 0; i < numlocalplayers; i++)
|
for (i = 0; i < numlocalplayers; i++)
|
||||||
{
|
{
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
continue; // this doesn't interest us
|
continue; // this doesn't interest us
|
||||||
|
|
||||||
if (players[localplayers[i]].mo->skin)
|
if (players[localplayers[i]].mo->skin)
|
||||||
skin = ((skin_t*)players[localplayers[i]].mo->skin)-skins;
|
skin = ((skin_t*)players[localplayers[i]].mo->skin)-skins;
|
||||||
else
|
else
|
||||||
skin = 0;
|
skin = 0;
|
||||||
|
|
||||||
if (players[localplayers[i]].mo->color)
|
if (players[localplayers[i]].mo->color)
|
||||||
{
|
{
|
||||||
if (players[localplayers[i]].mo->colorized)
|
if (players[localplayers[i]].mo->colorized)
|
||||||
colormap = R_GetTranslationColormap(TC_RAINBOW, players[localplayers[i]].mo->color, GTC_CACHE);
|
colormap = R_GetTranslationColormap(TC_RAINBOW, players[localplayers[i]].mo->color, GTC_CACHE);
|
||||||
else
|
else
|
||||||
colormap = R_GetTranslationColormap(skin, players[localplayers[i]].mo->color, GTC_CACHE);
|
colormap = R_GetTranslationColormap(skin, players[localplayers[i]].mo->color, GTC_CACHE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
colormap = NULL;
|
colormap = NULL;
|
||||||
|
|
||||||
K_drawKartMinimapIcon(players[localplayers[i]].mo->x, players[localplayers[i]].mo->y, x, y, splitflags, facemmapprefix[skin], colormap, AutomapPic);
|
K_drawKartMinimapIcon(players[localplayers[i]].mo->x, players[localplayers[i]].mo->y, x, y, splitflags, facemmapprefix[skin], colormap, AutomapPic);
|
||||||
|
|
||||||
// Target reticule
|
// Target reticule
|
||||||
if ((G_RaceGametype() && players[localplayers[i]].kartstuff[k_position] == spbplace)
|
if ((G_RaceGametype() && players[localplayers[i]].kartstuff[k_position] == spbplace)
|
||||||
|| (G_BattleGametype() && K_IsPlayerWanted(&players[localplayers[i]])))
|
|| (G_BattleGametype() && K_IsPlayerWanted(&players[localplayers[i]])))
|
||||||
K_drawKartMinimapIcon(players[localplayers[i]].mo->x, players[localplayers[i]].mo->y, x, y, splitflags, kp_wantedreticle, NULL, AutomapPic);
|
K_drawKartMinimapIcon(players[localplayers[i]].mo->x, players[localplayers[i]].mo->y, x, y, splitflags, kp_wantedreticle, NULL, AutomapPic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartStartCountdown(void)
|
static void K_drawKartStartCountdown(void)
|
||||||
{
|
{
|
||||||
|
|
@ -10619,6 +10625,7 @@ static void K_DrawWaypointDebugger(void)
|
||||||
{
|
{
|
||||||
if ((cv_kartdebugwaypoints.value != 0) && (stplyr == &players[displayplayers[0]]))
|
if ((cv_kartdebugwaypoints.value != 0) && (stplyr == &players[displayplayers[0]]))
|
||||||
{
|
{
|
||||||
|
V_DrawString(8, 166, 0, va("'Best' Waypoint ID: %d", K_GetWaypointID(stplyr->nextwaypoint)));
|
||||||
V_DrawString(8, 176, 0, va("Finishline Distance: %d", stplyr->distancetofinish));
|
V_DrawString(8, 176, 0, va("Finishline Distance: %d", stplyr->distancetofinish));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -10823,8 +10830,10 @@ void K_drawKartHUD(void)
|
||||||
K_drawKartFreePlay(leveltime);
|
K_drawKartFreePlay(leveltime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stplyr->kartstuff[k_wrongway] && ((leveltime / 8) & 1))
|
if (splitscreen == 0 && stplyr->kartstuff[k_wrongway] && ((leveltime / 8) & 1))
|
||||||
|
{
|
||||||
V_DrawCenteredString(BASEVIDWIDTH>>1, 176, V_REDMAP|V_SNAPTOBOTTOM, "WRONG WAY");
|
V_DrawCenteredString(BASEVIDWIDTH>>1, 176, V_REDMAP|V_SNAPTOBOTTOM, "WRONG WAY");
|
||||||
|
}
|
||||||
|
|
||||||
if (cv_kartdebugdistribution.value)
|
if (cv_kartdebugdistribution.value)
|
||||||
K_drawDistributionDebugger();
|
K_drawDistributionDebugger();
|
||||||
|
|
|
||||||
|
|
@ -461,6 +461,9 @@ void K_DebugWaypointsVisualise(void)
|
||||||
debugmobj = P_SpawnMobj(waypointmobj->x, waypointmobj->y, waypointmobj->z, MT_SPARK);
|
debugmobj = P_SpawnMobj(waypointmobj->x, waypointmobj->y, waypointmobj->z, MT_SPARK);
|
||||||
P_SetMobjState(debugmobj, S_THOK);
|
P_SetMobjState(debugmobj, S_THOK);
|
||||||
|
|
||||||
|
debugmobj->frame &= ~FF_TRANSMASK;
|
||||||
|
debugmobj->frame |= FF_TRANS20;
|
||||||
|
|
||||||
// There's a waypoint setup for this mobj! So draw that it's a valid waypoint and draw lines to its connections
|
// There's a waypoint setup for this mobj! So draw that it's a valid waypoint and draw lines to its connections
|
||||||
if (waypoint != NULL)
|
if (waypoint != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue