- Minimap heads that aren't yours are transparent
- Minimap has a visibility slider
- Bomb stuff renamed to Mine
This commit is contained in:
TehRealSalt 2018-02-07 22:33:27 -05:00
parent 00af56aa2a
commit 8c2bdfd006
11 changed files with 180 additions and 176 deletions

View file

@ -348,7 +348,8 @@ consvar_t cv_tripleorbinaut = {"tripleorbinaut", "On", CV_NETVAR|CV_CHEAT, C
consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartminimap = {"kartminimap", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t kartstarsfx_cons_t[] = {{0, "Music"}, {1, "SMK"}, {0, NULL}};
consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -359,7 +360,7 @@ consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_
consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartComeback_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartMirror_OnChange, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t speedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}};
consvar_t cv_speedometer = {"speedometer", "Kilometers", CV_SAVE, speedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
consvar_t cv_speedometer = {"speedometer", "Off", CV_SAVE, speedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
static CV_PossibleValue_t kartdebugitem_cons_t[] = {{-1, "MIN"}, {NUMKARTITEMS-1, "MAX"}, {0, NULL}};
consvar_t cv_kartdebugitem = {"kartdebugitem", "0", CV_NETVAR|CV_CHEAT, kartdebugitem_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};

View file

@ -7002,10 +7002,10 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_REDITEM",
"MT_REDITEMDUD",
"MT_BOMBSHIELD", // Special Stage Mine stuff
"MT_BOMBITEM",
"MT_BOMBEXPLOSION",
"MT_BOMBEXPLOSIONSOUND",
"MT_MINESHIELD", // Special Stage Mine stuff
"MT_MINEITEM",
"MT_MINEEXPLOSION",
"MT_MINEEXPLOSIONSOUND",
"MT_SMOLDERING", // New explosion
"MT_BOOMPARTICLE",

View file

@ -2684,35 +2684,35 @@ state_t states[NUMSTATES] =
{SPR_SSMN, 12, 3, {NULL}, 0, 0, S_BOMBDEPLOY12}, // S_BOMBDEPLOY11
{SPR_SSMN, 13, 3, {NULL}, 0, 0, S_BOMBDEPLOY13}, // S_BOMBDEPLOY12
{SPR_SSMN, 14, 3, {NULL}, 0, 0, S_BOMBITEM1}, // S_BOMBDEPLOY13
{SPR_SSMN, 0, 30, {A_GrenadeRing}, 0, 0, S_BOMBITEM2}, // S_BOMBITEM1
{SPR_SSMN, 3, 3, {A_GrenadeRing}, 0, 0, S_BOMBITEM3}, // S_BOMBITEM2
{SPR_SSMN, 2, 3, {A_GrenadeRing}, 0, 0, S_BOMBITEM4}, // S_BOMBITEM3
{SPR_SSMN, 1, 3, {A_GrenadeRing}, 0, 0, S_BOMBITEM1}, // S_BOMBITEM4
{SPR_SSMN, 3, 1, {A_MineExplode}, MT_BOMBEXPLOSION, 0, S_NULL}, // S_BOMBEXPLODE
{SPR_SSMN, 0, 30, {NULL}, 0, 0, S_BOMBITEM2}, // S_BOMBITEM1
{SPR_SSMN, 3, 3, {NULL}, 0, 0, S_BOMBITEM3}, // S_BOMBITEM2
{SPR_SSMN, 2, 3, {NULL}, 0, 0, S_BOMBITEM4}, // S_BOMBITEM3
{SPR_SSMN, 1, 3, {NULL}, 0, 0, S_BOMBITEM1}, // S_BOMBITEM4
{SPR_SSMN, 3, 1, {A_MineExplode}, MT_MINEEXPLOSION, 0, S_NULL}, // S_BOMBEXPLODE
{SPR_NULL, 0, 6, {NULL}, 0, 0, S_BOMBEXPLOSION2}, // S_BOMBEXPLOSION1
{SPR_NULL, 1, 22, {A_ForceStop}, 0, 0, S_NULL}, // S_BOMBEXPLOSION2
{SPR_KRBM, 0, 1, {NULL}, 0, 0, S_QUICKBOOM2}, // S_QUICKBOOM1
{SPR_KRBM, 1, 1, {NULL}, 0, 0, S_QUICKBOOM3}, // S_QUICKBOOM2
{SPR_KRBM, 2, 1, {NULL}, 0, 0, S_QUICKBOOM4}, // S_QUICKBOOM3
{SPR_KRBM, 3, 1, {NULL}, 0, 0, S_QUICKBOOM5}, // S_QUICKBOOM4
{SPR_KRBM, 4, 1, {NULL}, 0, 0, S_QUICKBOOM6}, // S_QUICKBOOM5
{SPR_KRBM, 5, 1, {NULL}, 0, 0, S_QUICKBOOM7}, // S_QUICKBOOM6
{SPR_KRBM, 6, 1, {NULL}, 0, 0, S_QUICKBOOM8}, // S_QUICKBOOM7
{SPR_KRBM, 7, 2, {NULL}, 0, 0, S_QUICKBOOM9}, // S_QUICKBOOM8
{SPR_KRBM, 8, 2, {NULL}, 0, 0, S_QUICKBOOM10}, // S_QUICKBOOM9
{SPR_KRBM, 9, 2, {NULL}, 0, 0, S_NULL}, // S_QUICKBOOM10
{SPR_KRBM, FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_QUICKBOOM2}, // S_QUICKBOOM1
{SPR_KRBM, FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_QUICKBOOM3}, // S_QUICKBOOM2
{SPR_KRBM, FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_QUICKBOOM4}, // S_QUICKBOOM3
{SPR_KRBM, FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_QUICKBOOM5}, // S_QUICKBOOM4
{SPR_KRBM, FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_QUICKBOOM6}, // S_QUICKBOOM5
{SPR_KRBM, FF_FULLBRIGHT|5, 1, {NULL}, 0, 0, S_QUICKBOOM7}, // S_QUICKBOOM6
{SPR_KRBM, FF_FULLBRIGHT|6, 1, {NULL}, 0, 0, S_QUICKBOOM8}, // S_QUICKBOOM7
{SPR_KRBM, FF_FULLBRIGHT|7, 2, {NULL}, 0, 0, S_QUICKBOOM9}, // S_QUICKBOOM8
{SPR_KRBM, FF_FULLBRIGHT|8, 2, {NULL}, 0, 0, S_QUICKBOOM10}, // S_QUICKBOOM9
{SPR_KRBM, FF_FULLBRIGHT|9, 2, {NULL}, 0, 0, S_NULL}, // S_QUICKBOOM10
{SPR_KRBM, 0, 3, {NULL}, 0, 0, S_SLOWBOOM2}, // S_SLOWBOOM1
{SPR_KRBM, 1, 3, {NULL}, 0, 0, S_SLOWBOOM3}, // S_SLOWBOOM2
{SPR_KRBM, 2, 3, {NULL}, 0, 0, S_SLOWBOOM4}, // S_SLOWKBOOM3
{SPR_KRBM, 3, 3, {NULL}, 0, 0, S_SLOWBOOM5}, // S_SLOWBOOM4
{SPR_KRBM, 4, 3, {NULL}, 0, 0, S_SLOWBOOM6}, // S_SLOWBOOM5
{SPR_KRBM, 5, 3, {NULL}, 0, 0, S_SLOWBOOM7}, // S_SLOWBOOM6
{SPR_KRBM, 6, 3, {NULL}, 0, 0, S_SLOWBOOM8}, // S_SLOWBOOM7
{SPR_KRBM, 7, 5, {NULL}, 0, 0, S_SLOWBOOM9}, // S_SLOWBOOM8
{SPR_KRBM, 8, 5, {NULL}, 0, 0, S_SLOWBOOM10}, // S_SLOWBOOM9
{SPR_KRBM, 9, 5, {NULL}, 0, 0, S_NULL}, // S_SLOWBOOM10
{SPR_KRBM, FF_FULLBRIGHT, 3, {NULL}, 0, 0, S_SLOWBOOM2}, // S_SLOWBOOM1
{SPR_KRBM, FF_FULLBRIGHT|1, 3, {NULL}, 0, 0, S_SLOWBOOM3}, // S_SLOWBOOM2
{SPR_KRBM, FF_FULLBRIGHT|2, 3, {NULL}, 0, 0, S_SLOWBOOM4}, // S_SLOWKBOOM3
{SPR_KRBM, FF_FULLBRIGHT|3, 3, {NULL}, 0, 0, S_SLOWBOOM5}, // S_SLOWBOOM4
{SPR_KRBM, FF_FULLBRIGHT|4, 3, {NULL}, 0, 0, S_SLOWBOOM6}, // S_SLOWBOOM5
{SPR_KRBM, FF_FULLBRIGHT|5, 3, {NULL}, 0, 0, S_SLOWBOOM7}, // S_SLOWBOOM6
{SPR_KRBM, FF_FULLBRIGHT|6, 3, {NULL}, 0, 0, S_SLOWBOOM8}, // S_SLOWBOOM7
{SPR_KRBM, FF_FULLBRIGHT|7, 5, {NULL}, 0, 0, S_SLOWBOOM9}, // S_SLOWBOOM8
{SPR_KRBM, FF_FULLBRIGHT|8, 5, {NULL}, 0, 0, S_SLOWBOOM10}, // S_SLOWBOOM9
{SPR_KRBM, FF_FULLBRIGHT|9, 5, {NULL}, 0, 0, S_NULL}, // S_SLOWBOOM10
{SPR_BLIG, 0, 2, {NULL}, 0, 0, S_BLUELIGHTNING2}, // S_BLUELIGHTNING1
{SPR_BLIG, 1, 2, {NULL}, 0, 0, S_BLUELIGHTNING3}, // S_BLUELIGHTNING2
@ -14676,7 +14676,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_BOMBSHIELD
{ // MT_MINESHIELD
-1, // doomednum
S_BOMBSHIELD1, // spawnstate
1000, // spawnhealth
@ -14685,7 +14685,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
256*FRACUNIT, // painchance
320*FRACUNIT, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
@ -14703,7 +14703,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_BOMBITEM
{ // MT_MINEITEM
-1, // doomednum
S_BOMBAIR1, // spawnstate
105, // spawnhealth
@ -14712,7 +14712,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
288*FRACUNIT, // painchance
320*FRACUNIT, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
@ -14730,7 +14730,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_BOMBEXPLOSION
{ // MT_MINEEXPLOSION
-1, // doomednum
S_BOMBEXPLOSION1, // spawnstate
1000, // spawnhealth
@ -14757,7 +14757,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_BOMBEXPLOSIONSOUND
{ // MT_MINEEXPLOSIONSOUND
-1, // doomednum
S_INVISIBLE, // spawnstate
100, // spawnhealth

View file

@ -3978,10 +3978,10 @@ typedef enum mobj_type
MT_REDITEM,
MT_REDITEMDUD,
MT_BOMBSHIELD, // Mine stuff
MT_BOMBITEM,
MT_BOMBEXPLOSION,
MT_BOMBEXPLOSIONSOUND,
MT_MINESHIELD, // Mine stuff
MT_MINEITEM,
MT_MINEEXPLOSION,
MT_MINEEXPLOSIONSOUND,
MT_SMOLDERING, // New explosion
MT_BOOMPARTICLE,

View file

@ -1786,7 +1786,7 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
dust->angle = (ANGLE_180/16) * i;
dust->scale = source->scale;
dust->destscale = source->scale*10;
P_InstaThrust(dust, dust->angle, FixedMul(20*FRACUNIT, source->scale));
P_InstaThrust(dust, dust->angle, FixedMul(25*FRACUNIT, source->scale));
truc = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT,
source->y + P_RandomRange(-radius, radius)*FRACUNIT,
@ -1794,10 +1794,10 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
truc->scale = source->scale*2;
truc->destscale = source->scale*6;
P_SetMobjState(truc, S_SLOWBOOM1);
speed = FixedMul(10*FRACUNIT, source->scale)>>FRACBITS;
speed = FixedMul(12*FRACUNIT, source->scale)>>FRACBITS;
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS;
speed = FixedMul(25*FRACUNIT, source->scale)>>FRACBITS;
truc->momz = P_RandomRange(-speed, speed)*FRACUNIT;
truc->color = color;
}
@ -1810,18 +1810,18 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color)
dust->scale = source->scale;
dust->destscale = source->scale*10;
dust->tics = 30;
dust->momz = P_RandomRange(FixedMul(3*FRACUNIT, source->scale)>>FRACBITS, FixedMul(7*FRACUNIT, source->scale)>>FRACBITS)*FRACUNIT;
dust->momz = P_RandomRange(FixedMul(4*FRACUNIT, source->scale)>>FRACBITS, FixedMul(9*FRACUNIT, source->scale)>>FRACBITS)*FRACUNIT;
truc = P_SpawnMobj(source->x + P_RandomRange(-radius, radius)*FRACUNIT,
source->y + P_RandomRange(-radius, radius)*FRACUNIT,
source->z + P_RandomRange(0, height)*FRACUNIT, MT_BOOMPARTICLE);
truc->scale = source->scale;
truc->destscale = source->scale*5;
speed = FixedMul(20*FRACUNIT, source->scale)>>FRACBITS;
speed = FixedMul(25*FRACUNIT, source->scale)>>FRACBITS;
truc->momx = P_RandomRange(-speed, speed)*FRACUNIT;
truc->momy = P_RandomRange(-speed, speed)*FRACUNIT;
speed = FixedMul(15*FRACUNIT, source->scale)>>FRACBITS;
speed2 = FixedMul(45*FRACUNIT, source->scale)>>FRACBITS;
speed = FixedMul(18*FRACUNIT, source->scale)>>FRACBITS;
speed2 = FixedMul(56*FRACUNIT, source->scale)>>FRACBITS;
truc->momz = P_RandomRange(speed, speed2)*FRACUNIT;
if (P_RandomChance(FRACUNIT/2))
truc->momz = -truc->momz;
@ -2970,14 +2970,14 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
newangle = player->mo->angle;
newx = player->mo->x + P_ReturnThrustX(player->mo, newangle + ANGLE_180, 64*FRACUNIT);
newy = player->mo->y + P_ReturnThrustY(player->mo, newangle + ANGLE_180, 64*FRACUNIT);
mo = P_SpawnMobj(newx, newy, player->mo->z, MT_BOMBSHIELD);
mo = P_SpawnMobj(newx, newy, player->mo->z, MT_MINESHIELD);
mo->threshold = 10;
if (mo)
P_SetTarget(&mo->target, player->mo);
}
else if (!(cmd->buttons & BT_ATTACK) && HOLDING_ITEM)
{
K_ThrowKartItem(player, false, MT_BOMBITEM, 1, true);
K_ThrowKartItem(player, false, MT_MINEITEM, 1, true);
K_PlayTauntSound(player->mo);
player->kartstuff[k_itemamount]--;
player->kartstuff[k_itemheld] = 0;
@ -3565,8 +3565,8 @@ static void K_initKartHUD(void)
SPDM_X = 9; // 9
SPDM_Y = BASEVIDHEIGHT - 45; // 155
// Position Number
POSI_X = BASEVIDWIDTH - 6; // 268
POSI_Y = BASEVIDHEIGHT - 4; // 138
POSI_X = BASEVIDWIDTH - 9; // 268
POSI_Y = BASEVIDHEIGHT - 9; // 138
// Top-Four Faces
FACE_X = 9; // 9
FACE_Y = 92; // 92
@ -3577,7 +3577,7 @@ static void K_initKartHUD(void)
CHEK_Y = BASEVIDHEIGHT; // 200
// Minimap
MINI_X = BASEVIDWIDTH - 50; // 270
MINI_Y = BASEVIDHEIGHT/2; // 100
MINI_Y = (BASEVIDHEIGHT/2)-16; // 84
if (splitscreen) // Splitscreen
@ -4265,17 +4265,95 @@ void K_ReloadSkinIconGraphics(void)
K_LoadIconGraphics(skins[i].iconprefix, i);
}
static void K_drawKartMinimap(void)
static void K_drawKartMinimapHead(player_t *player, INT32 x, INT32 y, INT32 flags, patch_t *AutomapPic)
{
// amnum xpos & ypos are the icon's speed around the HUD.
// The number being divided by is for how fast it moves.
// The higher the number, the slower it moves.
// am xpos & ypos are the icon's starting position. Withouht
// it, they wouldn't 'spawn' on the top-right side of the HUD.
fixed_t amnumxpos;
fixed_t amnumypos;
INT32 amxpos;
INT32 amypos;
node_t *bsp = &nodes[numnodes-1];
fixed_t maxx, minx, maxy, miny;
maxx = maxy = INT32_MAX;
minx = miny = INT32_MIN;
minx = bsp->bbox[0][BOXLEFT];
maxx = bsp->bbox[0][BOXRIGHT];
miny = bsp->bbox[0][BOXBOTTOM];
maxy = bsp->bbox[0][BOXTOP];
if (bsp->bbox[1][BOXLEFT] < minx)
minx = bsp->bbox[1][BOXLEFT];
if (bsp->bbox[1][BOXRIGHT] > maxx)
maxx = bsp->bbox[1][BOXRIGHT];
if (bsp->bbox[1][BOXBOTTOM] < miny)
miny = bsp->bbox[1][BOXBOTTOM];
if (bsp->bbox[1][BOXTOP] > maxy)
maxy = bsp->bbox[1][BOXTOP];
// 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...
// 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
minx >>= FRACBITS;
maxx >>= FRACBITS;
miny >>= FRACBITS;
maxy >>= FRACBITS;
fixed_t mapwidth = maxx - minx;
fixed_t mapheight = maxy - miny;
// These should always be small enough to be bitshift back right now
fixed_t xoffset = (minx + mapwidth/2)<<FRACBITS;
fixed_t yoffset = (miny + mapheight/2)<<FRACBITS;
fixed_t xscale = FixedDiv(AutomapPic->width, mapwidth);
fixed_t yscale = FixedDiv(AutomapPic->height, mapheight);
fixed_t zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20);
amnumxpos = (FixedMul(player->mo->x, zoom) - FixedMul(xoffset, zoom));
amnumypos = -(FixedMul(player->mo->y, zoom) - FixedMul(yoffset, zoom));
amxpos = amnumxpos + ((x + AutomapPic->width/2 - (iconprefix[player->skin]->width/2))<<FRACBITS);
amypos = amnumypos + ((y + AutomapPic->height/2 - (iconprefix[player->skin]->height/2))<<FRACBITS);
if (mirrormode)
{
flags |= V_FLIP;
amxpos = -amnumxpos + ((x + AutomapPic->width/2 + (iconprefix[player->skin]->width/2))<<FRACBITS);
}
if (!player->skincolor) // 'default' color
V_DrawSciencePatch(amxpos, amypos, flags, iconprefix[player->skin], FRACUNIT);
else
{
UINT8 *colormap;
if (player->mo->colorized)
{
colormap = R_GetTranslationColormap(TC_RAINBOW, player->mo->color, 0);
}
else
{
colormap = R_GetTranslationColormap(player->skin, player->mo->color, 0);
}
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, iconprefix[player->skin], colormap);
}
}
static void K_drawKartMinimap(void)
{
INT32 lumpnum;
patch_t *AutomapPic;
INT32 i = 0;
INT32 x, y;
INT32 splitflags = V_SNAPTORIGHT|V_HUDTRANSHALF;
const INT32 minimaptrans = ((10-cv_kartminimap.value)<<FF_TRANSSHIFT);
INT32 splitflags = V_SNAPTORIGHT|minimaptrans;
// Draw the HUD only when playing in a level.
// hu_stuff needs this, unlike st_stuff.
@ -4303,106 +4381,27 @@ static void K_drawKartMinimap(void)
else
V_DrawScaledPatch(x, y, splitflags, AutomapPic);
splitflags &= ~V_HUDTRANSHALF; // Head icons won't be transparent
if (splitscreen != 2)
splitflags |= V_HUDTRANS;
{
splitflags &= ~minimaptrans;
splitflags |= V_HUDTRANSHALF;
}
// Player's tiny icons on the Automap.
for (i = 0; i < MAXPLAYERS; i++)
{
if (i == displayplayer && splitscreen != 2)
continue; // Do displayplayer later
if (players[i].mo && !players[i].spectator)
{
// amnum xpos & ypos are the icon's speed around the HUD.
// The number being divided by is for how fast it moves.
// The higher the number, the slower it moves.
// am xpos & ypos are the icon's starting position. Withouht
// it, they wouldn't 'spawn' on the top-right side of the HUD.
node_t *bsp = &nodes[numnodes-1];
fixed_t maxx, minx, maxy, miny;
maxx = maxy = INT32_MAX;
minx = miny = INT32_MIN;
minx = bsp->bbox[0][BOXLEFT];
maxx = bsp->bbox[0][BOXRIGHT];
miny = bsp->bbox[0][BOXBOTTOM];
maxy = bsp->bbox[0][BOXTOP];
if (bsp->bbox[1][BOXLEFT] < minx)
minx = bsp->bbox[1][BOXLEFT];
if (bsp->bbox[1][BOXRIGHT] > maxx)
maxx = bsp->bbox[1][BOXRIGHT];
if (bsp->bbox[1][BOXBOTTOM] < miny)
miny = bsp->bbox[1][BOXBOTTOM];
if (bsp->bbox[1][BOXTOP] > maxy)
maxy = bsp->bbox[1][BOXTOP];
// 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...
// 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
minx >>= FRACBITS;
maxx >>= FRACBITS;
miny >>= FRACBITS;
maxy >>= FRACBITS;
fixed_t mapwidth = maxx - minx;
fixed_t mapheight = maxy - miny;
// These should always be small enough to be bitshift back right now
fixed_t xoffset = (minx + mapwidth/2)<<FRACBITS;
fixed_t yoffset = (miny + mapheight/2)<<FRACBITS;
fixed_t xscale = FixedDiv(AutomapPic->width, mapwidth);
fixed_t yscale = FixedDiv(AutomapPic->height, mapheight);
fixed_t zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20);
amnumxpos = (FixedMul(players[i].mo->x, zoom) - FixedMul(xoffset, zoom));
amnumypos = -(FixedMul(players[i].mo->y, zoom) - FixedMul(yoffset, zoom));
amxpos = amnumxpos + ((x + AutomapPic->width/2 - (iconprefix[players[i].skin]->width/2))<<FRACBITS);
amypos = amnumypos + ((y + AutomapPic->height/2 - (iconprefix[players[i].skin]->height/2))<<FRACBITS);
if (mirrormode)
{
amxpos = -amnumxpos + ((x + AutomapPic->width/2 + (iconprefix[players[i].skin]->width/2))<<FRACBITS);
if (!players[i].skincolor) // 'default' color
V_DrawSciencePatch(amxpos, amypos, splitflags|V_FLIP, iconprefix[players[i].skin], FRACUNIT);
else
{
UINT8 *colormap;
if (players[i].mo->colorized)
{
colormap = R_GetTranslationColormap(TC_RAINBOW, players[i].mo->color, 0);
}
else
{
colormap = R_GetTranslationColormap(players[i].skin, players[i].mo->color, 0);
}
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, splitflags|V_FLIP, iconprefix[players[i].skin], colormap);
}
}
else
{
if (!players[i].skincolor) // 'default' color
V_DrawSciencePatch(amxpos, amypos, splitflags, iconprefix[players[i].skin], FRACUNIT);
else
{
UINT8 *colormap;
if (players[i].mo->colorized)
{
colormap = R_GetTranslationColormap(TC_RAINBOW, players[i].mo->color, 0);
}
else
{
colormap = R_GetTranslationColormap(players[i].skin, players[i].mo->color, 0);
}
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, splitflags, iconprefix[players[i].skin], colormap);
}
}
}
K_drawKartMinimapHead(&players[i], x, y, splitflags, AutomapPic);
}
if (splitscreen == 2)
return; // Don't need this for splits
splitflags &= ~V_HUDTRANSHALF;
splitflags |= V_HUDTRANS;
K_drawKartMinimapHead(stplyr, x, y, splitflags, AutomapPic);
}
static void K_drawBattleFullscreen(void)
@ -4632,7 +4631,7 @@ void K_drawKartHUD(void)
K_drawKartPlayerCheck();
}
if ((splitscreen == 0 || splitscreen == 2) && cv_kartminimap.value)
if ((splitscreen == 0 && cv_kartminimap.value) || splitscreen == 2)
K_drawKartMinimap();
// Draw the item window

View file

@ -1422,10 +1422,11 @@ static menuitem_t OP_GameOptionsMenu[] =
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
NULL, "HUD Visibility", &cv_translucenthud, 50},
{IT_STRING | IT_CVAR, NULL, "Star SFX", &cv_kartstarsfx, 62},
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
NULL, "Minimap Visibility", &cv_kartminimap, 62},
{IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_speedometer, 72},
{IT_STRING | IT_CVAR, NULL, "Show Minimap", &cv_kartminimap, 82},
{IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 92},
{IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 82},
{IT_STRING | IT_CVAR, NULL, "Star SFX", &cv_kartstarsfx, 92},
#ifdef SEENAMES
{IT_STRING | IT_CVAR, NULL, "HUD Player Names", &cv_seenames, 104},

View file

@ -8277,7 +8277,7 @@ void A_MineExplode(mobj_t *actor)
else
K_SpawnMineExplosion(actor, SKINCOLOR_RED);
P_SpawnMobj(actor->x, actor->y, actor->z, MT_BOMBEXPLOSIONSOUND);
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MINEEXPLOSIONSOUND);
//S_StartSound(actor, sfx_prloop);
@ -8288,7 +8288,7 @@ void A_MineExplode(mobj_t *actor)
mo2 = (mobj_t *)th;
if (mo2 == actor || mo2->type == MT_BOMBEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
if (mo2 == actor || mo2->type == MT_MINEEXPLOSIONSOUND) // Don't explode yourself! Endless loop!
continue;
if (gametype == GT_MATCH && actor->target && actor->target->player && actor->target->player->kartstuff[k_balloon] <= 0 && mo2 == actor->target)

View file

@ -2038,7 +2038,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
&& ((target->type == MT_GREENSHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_ORBINAUT)
|| (target->type == MT_REDSHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_JAWZ)
|| (target->type == MT_BANANASHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_BANANA)
|| (target->type == MT_BOMBSHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_MINE)))
|| (target->type == MT_MINESHIELD && target->target->player->kartstuff[k_itemtype] == KITEM_MINE)))
{
if (target->lastlook > 0)
target->target->player->kartstuff[k_itemamount] = target->lastlook-1;

View file

@ -761,7 +761,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
}
else if (thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM)
else if (thing->type == MT_MINESHIELD || thing->type == MT_MINEITEM)
{
// This Item Damage
if (tmthing->eflags & MFE_VERTICALFLIP)
@ -825,7 +825,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
}
else if (tmthing->type == MT_BOMBEXPLOSION)
else if (tmthing->type == MT_MINEEXPLOSION)
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
@ -974,7 +974,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (thing->type == MT_GREENITEM // When these items collide with the fake item, just the fake item is destroyed
|| thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|| thing->type == MT_BOMBITEM
|| thing->type == MT_MINEITEM
|| thing->type == MT_BANANAITEM || thing->type == MT_FIREBALL)
{
// This Item Damage
@ -991,7 +991,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
}
else if (thing->type == MT_GREENSHIELD // When these items collide with the fake item, both of them are destroyed
|| thing->type == MT_REDSHIELD
|| thing->type == MT_BOMBSHIELD
|| thing->type == MT_MINESHIELD
|| thing->type == MT_BANANASHIELD
|| thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
{
@ -1041,7 +1041,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
}
else if (tmthing->type == MT_BOMBSHIELD || tmthing->type == MT_BOMBITEM)
else if (tmthing->type == MT_MINESHIELD || tmthing->type == MT_MINEITEM)
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
@ -1087,8 +1087,8 @@ static boolean PIT_CheckThing(mobj_t *thing)
|| thing->type == MT_REDSHIELD || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM
|| thing->type == MT_BANANASHIELD || thing->type == MT_BANANAITEM
|| thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM
|| thing->type == MT_BOMBEXPLOSION
|| thing->type == MT_MINESHIELD || thing->type == MT_MINEITEM
|| thing->type == MT_MINEEXPLOSION
|| thing->type == MT_SINK || thing->type == MT_FIREBALL
))
{
@ -1154,7 +1154,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetObjectMomZ(thing, 8*FRACUNIT, false);
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
}
else if (thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM)
else if (thing->type == MT_MINESHIELD || thing->type == MT_MINEITEM)
{
if ((thing->target == tmthing) && (thing->threshold > 0))
return true;
@ -1164,7 +1164,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_KillMobj(thing, tmthing, tmthing);
}
else if (thing->type == MT_BOMBEXPLOSION && tmthing->player)
else if (thing->type == MT_MINEEXPLOSION && tmthing->player)
{
// Player Damage
if (thing->state == &states[S_BOMBEXPLOSION1])

View file

@ -1402,7 +1402,7 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
gravityadd >>= 1;
case MT_BANANAITEM:
case MT_FAKEITEM:
case MT_BOMBITEM:
case MT_MINEITEM:
gravityadd = FixedMul(gravityadd, 5*FRACUNIT/2);
default:
break;
@ -6598,7 +6598,7 @@ void P_MobjThinker(mobj_t *mobj)
case MT_REDSHIELD:
case MT_BANANASHIELD:
case MT_FAKESHIELD:
case MT_BOMBSHIELD:
case MT_MINESHIELD:
if (mobj->health > 0 && mobj->target && mobj->target->player && mobj->target->player->mo
&& mobj->target->player->health > 0 && !mobj->target->player->spectator)
{
@ -6669,7 +6669,7 @@ void P_MobjThinker(mobj_t *mobj)
if ((mobj->type == MT_GREENSHIELD && mobj->target->player->kartstuff[k_itemtype] != KITEM_ORBINAUT)
|| (mobj->type == MT_REDSHIELD && mobj->target->player->kartstuff[k_itemtype] != KITEM_JAWZ)
|| (mobj->type == MT_BANANASHIELD && mobj->target->player->kartstuff[k_itemtype] != KITEM_BANANA)
|| (mobj->type == MT_BOMBSHIELD && mobj->target->player->kartstuff[k_itemtype] != KITEM_MINE)
|| (mobj->type == MT_MINESHIELD && mobj->target->player->kartstuff[k_itemtype] != KITEM_MINE)
|| (mobj->type == MT_FAKESHIELD && !mobj->target->player->kartstuff[k_fakeitem])
|| (mobj->type != MT_FAKESHIELD && !mobj->target->player->kartstuff[k_itemheld])
|| (mobj->lastlook > 0 && mobj->target->player->kartstuff[k_itemamount] < mobj->lastlook))
@ -7254,7 +7254,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->z <= mobj->floorz)
P_RemoveMobj(mobj);
break;
case MT_BOMBITEM:
case MT_MINEITEM:
case MT_BLUEEXPLOSION:
if (mobj->health > -100)
{
@ -7264,7 +7264,7 @@ void P_MobjThinker(mobj_t *mobj)
else
P_RemoveMobj(mobj);
break;
case MT_BOMBEXPLOSIONSOUND:
case MT_MINEEXPLOSIONSOUND:
P_RemoveMobj(mobj);
break;
//}
@ -7901,7 +7901,7 @@ void P_MobjThinker(mobj_t *mobj)
if (mobj->threshold > 0)
mobj->threshold--;
break;
case MT_BOMBITEM:
case MT_MINEITEM:
if (mobj->target && mobj->target->player)
mobj->color = mobj->target->player->skincolor;
else
@ -7919,13 +7919,16 @@ void P_MobjThinker(mobj_t *mobj)
}
mobj->health--;
}
if (mobj->state == &states[S_BOMBITEM1] || mobj->state == &states[S_BOMBITEM2]
|| mobj->state == &states[S_BOMBITEM3] || mobj->state == &states[S_BOMBITEM4])
A_GrenadeRing(mobj);
if (mobj->threshold > 0)
mobj->threshold--;
break;
case MT_BLUEEXPLOSION:
mobj->health--;
break;
case MT_BOMBEXPLOSION:
case MT_MINEEXPLOSION:
if ((mobj->z < mobj->floorz - mobj->height) || (mobj->z > mobj->ceilingz + mobj->height))
{
P_KillMobj(mobj, NULL, NULL);
@ -7948,7 +7951,7 @@ void P_MobjThinker(mobj_t *mobj)
mobj->z += mobj->momz;
P_SetThingPosition(mobj);
return;
case MT_BOMBEXPLOSIONSOUND:
case MT_MINEEXPLOSIONSOUND:
if (mobj->health == 100)
S_StartSound(mobj, sfx_prloop);
mobj->health--;
@ -8712,7 +8715,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
case MT_REDITEM: case MT_REDSHIELD: case MT_REDITEMDUD:
case MT_BATTLEBALLOON: case MT_FIREBALL:
case MT_FAKEITEM: case MT_FAKESHIELD:
case MT_BOMBITEM: case MT_BOMBSHIELD:
case MT_MINEITEM: case MT_MINESHIELD:
P_SpawnShadowMobj(mobj);
default:
break;

View file

@ -303,7 +303,7 @@ void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT3
#endif
}
static UINT8 hudplusalpha[11] = { 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0};
//static UINT8 hudplusalpha[11] = { 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0};
static UINT8 hudminusalpha[11] = { 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5};
static const UINT8 *v_colormap = NULL;
@ -362,8 +362,8 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
alphalevel = hudminusalpha[cv_translucenthud.value];
else if (alphalevel == 14)
alphalevel = 10 - cv_translucenthud.value;
else if (alphalevel == 15)
alphalevel = hudplusalpha[cv_translucenthud.value];
/*else if (alphalevel == 15)
alphalevel = hudplusalpha[cv_translucenthud.value];*/
if (alphalevel >= 10)
return; // invis