Fix random duplicate code from merge in hw_main.c and r_segs.c

Whitespace cleanup
This commit is contained in:
Sryder 2017-02-18 00:25:16 +00:00
parent 68d439a783
commit 35b789d330
14 changed files with 61 additions and 75 deletions

View File

@ -64,10 +64,10 @@ CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
//SRB2kart //SRB2kart
CV_PossibleValue_t karthud_cons_t[] = { CV_PossibleValue_t karthud_cons_t[] = {
{0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"}, {0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"},
{0, NULL}}; {0, NULL}};
CV_PossibleValue_t kartcc_cons_t[] = { CV_PossibleValue_t kartcc_cons_t[] = {
{50, "50cc"}, {100, "100cc"}, {150, "150cc"}, {200, "200cc"}, {50, "50cc"}, {100, "100cc"}, {150, "150cc"}, {200, "200cc"},
{0, NULL}}; {0, NULL}};
#define COM_BUF_SIZE 8192 // command buffer size #define COM_BUF_SIZE 8192 // command buffer size

View File

@ -554,7 +554,7 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_bombshield); CV_RegisterVar(&cv_bombshield);
CV_RegisterVar(&cv_1up); CV_RegisterVar(&cv_1up);
CV_RegisterVar(&cv_eggmanbox); CV_RegisterVar(&cv_eggmanbox);
K_RegisterKartStuff(); // SRB2kart K_RegisterKartStuff(); // SRB2kart
CV_RegisterVar(&cv_ringslinger); CV_RegisterVar(&cv_ringslinger);

View File

@ -249,7 +249,7 @@ typedef struct
// (This is not ifdeffed so the map header structure can stay identical, just in case.) // (This is not ifdeffed so the map header structure can stay identical, just in case.)
UINT8 numCustomOptions; ///< Internal. For Lua custom value support. UINT8 numCustomOptions; ///< Internal. For Lua custom value support.
customoption_t *customopts; ///< Custom options. Allocated dynamically for space reasons. Be careful. customoption_t *customopts; ///< Custom options. Allocated dynamically for space reasons. Be careful.
// SRB2kart // SRB2kart
boolean automap; ///< Displays a level's white map outline in modified games boolean automap; ///< Displays a level's white map outline in modified games
} mapheader_t; } mapheader_t;

View File

@ -1248,12 +1248,12 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
//{ SRB2kart - Drift support //{ SRB2kart - Drift support
axis = JoyAxis(AXISTURN); axis = JoyAxis(AXISTURN);
if (turnleft || axis < 0) // Drifting to the left if (turnleft || axis < 0) // Drifting to the left
cmd->buttons |= BT_DRIFTLEFT; cmd->buttons |= BT_DRIFTLEFT;
else else
cmd->buttons &= ~BT_DRIFTLEFT; cmd->buttons &= ~BT_DRIFTLEFT;
if (turnright || axis > 0) // Drifting to the right if (turnright || axis > 0) // Drifting to the right
cmd->buttons |= BT_DRIFTRIGHT; cmd->buttons |= BT_DRIFTRIGHT;
else else
@ -1269,13 +1269,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
{ {
// SRB2kart // SRB2kart
INT32 turnspeed; INT32 turnspeed;
if (players[consoleplayer].mo && (players[consoleplayer].speed == 0)) if (players[consoleplayer].mo && (players[consoleplayer].speed == 0))
turnspeed = 0; turnspeed = 0;
else else
turnspeed = 16; turnspeed = 16;
cmd->angleturn = FixedMul(cmd->angleturn, FixedDiv(80 - (players[consoleplayer].speed >> 16), 80)); cmd->angleturn = FixedMul(cmd->angleturn, FixedDiv(80 - (players[consoleplayer].speed >> 16), 80));
if (players[consoleplayer].kartstuff[k_startimer] || players[consoleplayer].kartstuff[k_mushroomtimer] || players[consoleplayer].kartstuff[k_growshrinktimer] > 0) if (players[consoleplayer].kartstuff[k_startimer] || players[consoleplayer].kartstuff[k_mushroomtimer] || players[consoleplayer].kartstuff[k_growshrinktimer] > 0)
cmd->angleturn = FixedMul(cmd->angleturn, FixedDiv(5*FRACUNIT, 4*FRACUNIT)); cmd->angleturn = FixedMul(cmd->angleturn, FixedDiv(5*FRACUNIT, 4*FRACUNIT));
@ -1581,17 +1581,17 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
//{ SRB2kart - Drift support //{ SRB2kart - Drift support
axis = Joy2Axis(AXISTURN); axis = Joy2Axis(AXISTURN);
if (turnleft || axis < 0) // Drifting to the left if (turnleft || axis < 0) // Drifting to the left
cmd->buttons |= BT_DRIFTLEFT; cmd->buttons |= BT_DRIFTLEFT;
else else
cmd->buttons &= ~BT_DRIFTLEFT; cmd->buttons &= ~BT_DRIFTLEFT;
if (turnright || axis > 0) // Drifting to the right if (turnright || axis > 0) // Drifting to the right
cmd->buttons |= BT_DRIFTRIGHT; cmd->buttons |= BT_DRIFTRIGHT;
else else
cmd->buttons &= ~BT_DRIFTRIGHT; cmd->buttons &= ~BT_DRIFTRIGHT;
if (turnright && turnleft) if (turnright && turnleft)
{ {
cmd->buttons &= ~BT_DRIFTLEFT; cmd->buttons &= ~BT_DRIFTLEFT;
@ -2015,10 +2015,10 @@ void G_Ticker(boolean run)
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
{ {
cmd = &players[i].cmd; cmd = &players[i].cmd;
if (playeringame[i]) if (playeringame[i])
G_CopyTiccmd(cmd, &netcmds[buf][i], 1); G_CopyTiccmd(cmd, &netcmds[buf][i], 1);
// SRB2kart // SRB2kart
// Save the dir the player is holding // Save the dir the player is holding
// to allow items to be thrown forward or backward. // to allow items to be thrown forward or backward.
@ -2337,7 +2337,7 @@ void G_PlayerReborn(INT32 player)
S_SpeedMusic(1.2f); S_SpeedMusic(1.2f);
} }
} }
if (gametype == GT_COOP) if (gametype == GT_COOP)
P_FindEmerald(); // scan for emeralds to hunt for P_FindEmerald(); // scan for emeralds to hunt for

View File

@ -1178,9 +1178,6 @@ static void HWR_GetBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, con
HWD.pfnSetTexture(newmip); HWD.pfnSetTexture(newmip);
Z_ChangeTag(newmip->grInfo.data, PU_HWRCACHE_UNLOCKED); Z_ChangeTag(newmip->grInfo.data, PU_HWRCACHE_UNLOCKED);
HWD.pfnSetTexture(newmip);
Z_ChangeTag(newmip->grInfo.data, PU_HWRCACHE_UNLOCKED);
} }

View File

@ -1120,7 +1120,7 @@ void HU_Drawer(void)
// 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.
amnumxpos = (players[i].mo->x / 320) >> FRACBITS; amnumxpos = (players[i].mo->x / 320) >> FRACBITS;
amnumypos = (-players[i].mo->y / 340) >> FRACBITS; amnumypos = (-players[i].mo->y / 340) >> FRACBITS;
amxpos = (x + amnumxpos) - (iconprefix[players[i].skin]->width/4); amxpos = (x + amnumxpos) - (iconprefix[players[i].skin]->width/4);
amypos = (y + amnumypos) - (iconprefix[players[i].skin]->height/4); amypos = (y + amnumypos) - (iconprefix[players[i].skin]->height/4);
@ -1141,7 +1141,7 @@ void HU_Drawer(void)
} }
*/ */
// //
// draw chat string plus cursor // draw chat string plus cursor
if (chat_on) if (chat_on)
HU_DrawChat(); HU_DrawChat();
@ -1358,9 +1358,9 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
if (circuitmap) if (circuitmap)
{ {
if (players[tab[i].num].exiting) if (players[tab[i].num].exiting)
V_DrawRightAlignedString(x+240, y, V_YELLOWMAP, va("%d:%02d.%02d", V_DrawRightAlignedString(x+240, y, V_YELLOWMAP, va("%d:%02d.%02d",
players[tab[i].num].realtime/(60*TICRATE), players[tab[i].num].realtime/(60*TICRATE),
players[tab[i].num].realtime/TICRATE % 60, players[tab[i].num].realtime/TICRATE % 60,
players[tab[i].num].realtime % TICRATE)); players[tab[i].num].realtime % TICRATE));
//V_DrawRightAlignedString(x+240, y, 0, va("%i:%02i.%02i", G_TicsToMinutes(players[tab[i].num].realtime,true), G_TicsToSeconds(players[tab[i].num].realtime), G_TicsToCentiseconds(players[tab[i].num].realtime))); //V_DrawRightAlignedString(x+240, y, 0, va("%i:%02i.%02i", G_TicsToMinutes(players[tab[i].num].realtime,true), G_TicsToSeconds(players[tab[i].num].realtime), G_TicsToCentiseconds(players[tab[i].num].realtime)));
else else

View File

@ -577,13 +577,13 @@ typedef enum sprite
// Springs // Springs
SPR_SPRG, // Gray Spring SPR_SPRG, // Gray Spring
SPR_BSPR, // Blue Diagonal Spring SPR_BSPR, // Blue Diagonal Spring
SPR_RNDM, // Random Item Box SPR_RNDM, // Random Item Box
SPR_RPOP, // Random Item Box Pop SPR_RPOP, // Random Item Box Pop
SPR_KFRE, // Mushroom fire trail SPR_KFRE, // Mushroom fire trail
SPR_DRIF, // Drift Sparks SPR_DRIF, // Drift Sparks
SPR_DSMO, // Drift Smoke SPR_DSMO, // Drift Smoke
// Kart Items // Kart Items
SPR_FITE, // Fake Item box SPR_FITE, // Fake Item box
SPR_DFAK, // Dead Fake Item SPR_DFAK, // Dead Fake Item
@ -600,7 +600,7 @@ typedef enum sprite
SPR_LIGH, // Lightning SPR_LIGH, // Lightning
SPR_SINK, // Kitchen Sink SPR_SINK, // Kitchen Sink
SPR_SITR, // Kitchen Sink Trail SPR_SITR, // Kitchen Sink Trail
// Additional Kart Objects // Additional Kart Objects
SPR_POKE, // Lightning SPR_POKE, // Lightning

View File

@ -8269,7 +8269,7 @@ void A_BobombExplode(mobj_t *actor)
else else
P_DamageMobj(mo2, actor, actor->target, 1); P_DamageMobj(mo2, actor, actor->target, 1);
continue; continue;
} }

View File

@ -1438,7 +1438,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
} }
return; return;
case MT_EXTRALARGEBUBBLE: case MT_EXTRALARGEBUBBLE:
return; // SRB2kart - don't need bubbles mucking with the player return; // SRB2kart - don't need bubbles mucking with the player
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL) if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL)
return; return;
@ -1463,7 +1463,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (player->powers[pw_underwater] < underwatertics + 1) if (player->powers[pw_underwater] < underwatertics + 1)
player->powers[pw_underwater] = underwatertics + 1; player->powers[pw_underwater] = underwatertics + 1;
/* /*
if (!player->climbing) if (!player->climbing)
{ {
P_SetPlayerMobjState(toucher, S_PLAY_GASP); P_SetPlayerMobjState(toucher, S_PLAY_GASP);
@ -2068,11 +2068,11 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
// SRB2kart // SRB2kart
if (target->type != MT_PLAYER && !(target->flags & MF_MONITOR) if (target->type != MT_PLAYER && !(target->flags & MF_MONITOR)
&& !(target->type == MT_GREENITEM || target->type == MT_GREENSHIELD && !(target->type == MT_GREENITEM || target->type == MT_GREENSHIELD
|| target->type == MT_TRIPLEGREENSHIELD1 || target->type == MT_TRIPLEGREENSHIELD2 || target->type == MT_TRIPLEGREENSHIELD3 || target->type == MT_TRIPLEGREENSHIELD1 || target->type == MT_TRIPLEGREENSHIELD2 || target->type == MT_TRIPLEGREENSHIELD3
|| target->type == MT_REDITEM || target->type == MT_REDITEMDUD || target->type == MT_REDSHIELD || target->type == MT_REDITEM || target->type == MT_REDITEMDUD || target->type == MT_REDSHIELD
|| target->type == MT_TRIPLEREDSHIELD1 || target->type == MT_TRIPLEREDSHIELD2 || target->type == MT_TRIPLEREDSHIELD3 || target->type == MT_TRIPLEREDSHIELD1 || target->type == MT_TRIPLEREDSHIELD2 || target->type == MT_TRIPLEREDSHIELD3
|| target->type == MT_BANANAITEM || target->type == MT_BANANASHIELD || target->type == MT_BANANAITEM || target->type == MT_BANANASHIELD
|| target->type == MT_TRIPLEBANANASHIELD1 || target->type == MT_TRIPLEBANANASHIELD2 || target->type == MT_TRIPLEBANANASHIELD3 || target->type == MT_TRIPLEBANANASHIELD1 || target->type == MT_TRIPLEBANANASHIELD2 || target->type == MT_TRIPLEBANANASHIELD3
|| target->type == MT_FAKEITEM || target->type == MT_FAKESHIELD)) // kart dead items || target->type == MT_FAKEITEM || target->type == MT_FAKESHIELD)) // kart dead items
target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000 target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000
@ -2820,7 +2820,7 @@ static inline void P_SuperDamage(player_t *player, mobj_t *inflictor, mobj_t *so
/* // SRB2kart - This shouldn't be reachable, but this frame is invalid. /* // SRB2kart - This shouldn't be reachable, but this frame is invalid.
if (player->charflags & SF_SUPERANIMS) if (player->charflags & SF_SUPERANIMS)
P_SetPlayerMobjState(player->mo, S_PLAY_SUPERHIT); P_SetPlayerMobjState(player->mo, S_PLAY_SUPERHIT);
else else
*/ */
P_SetPlayerMobjState(player->mo, player->mo->info->painstate); P_SetPlayerMobjState(player->mo, player->mo->info->painstate);
@ -3108,9 +3108,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
} }
//{ SRB2kart - special damage sources //{ SRB2kart - special damage sources
player->kartstuff[k_mushroomtimer] = 0; player->kartstuff[k_mushroomtimer] = 0;
// Thunder // Thunder
if (damage == 64 && player != source->player) if (damage == 64 && player != source->player)
{ {

View File

@ -563,10 +563,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
} }
// SRB2kart 011617 - Colission code for kart items //{ // SRB2kart 011617 - Colission code for kart items //{
if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD || if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD ||
tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD || tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD ||
tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3 || tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3 ||
tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3) tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
{ {
// see if it went over / under // see if it went over / under
@ -625,7 +625,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetObjectMomZ(thing, 8*FRACUNIT, false); P_SetObjectMomZ(thing, 8*FRACUNIT, false);
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT); P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
// This Item Damage // This Item Damage
if (tmthing->eflags & MFE_VERTICALFLIP) if (tmthing->eflags & MFE_VERTICALFLIP)
@ -657,7 +657,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetObjectMomZ(tmthing, 8*FRACUNIT, false); P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT); P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
} }
// Other Item Damage // Other Item Damage
if (thing->eflags & MFE_VERTICALFLIP) if (thing->eflags & MFE_VERTICALFLIP)
thing->z -= thing->height; thing->z -= thing->height;
@ -750,7 +750,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true; // This doesn't collide with anything, but we want it to effect the player anyway. return true; // This doesn't collide with anything, but we want it to effect the player anyway.
} }
else if (tmthing->type == MT_BANANASHIELD || tmthing->type == MT_BANANAITEM else if (tmthing->type == MT_BANANASHIELD || tmthing->type == MT_BANANAITEM
|| tmthing->type == MT_TRIPLEBANANASHIELD1 || tmthing->type == MT_TRIPLEBANANASHIELD2 || tmthing->type == MT_TRIPLEBANANASHIELD3) || tmthing->type == MT_TRIPLEBANANASHIELD1 || tmthing->type == MT_TRIPLEBANANASHIELD2 || tmthing->type == MT_TRIPLEBANANASHIELD3)
{ {
// see if it went over / under // see if it went over / under
@ -804,7 +804,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetObjectMomZ(thing, 8*FRACUNIT, false); P_SetObjectMomZ(thing, 8*FRACUNIT, false);
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT); P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
// This Item Damage // This Item Damage
if (tmthing->eflags & MFE_VERTICALFLIP) if (tmthing->eflags & MFE_VERTICALFLIP)
tmthing->z -= tmthing->height; tmthing->z -= tmthing->height;
@ -863,7 +863,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true; return true;
if (thing->type == MT_GREENITEM // When these items collide with the fake item, just the fake item is destroyed 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_REDITEM || thing->type == MT_REDITEMDUD
|| thing->type == MT_BOMBITEM || thing->type == MT_BOMBITEM
|| thing->type == MT_BANANAITEM) || thing->type == MT_BANANAITEM)
{ {
@ -881,7 +881,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
} }
else if (thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3 // When these items collide with the fake item, both of them are destroyed else if (thing->type == MT_GREENSHIELD || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3 // When these items collide with the fake item, both of them are destroyed
|| thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3 || thing->type == MT_REDSHIELD || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|| thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBSHIELD
|| thing->type == MT_BANANASHIELD || thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3 || thing->type == MT_BANANASHIELD || thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|| thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD) || thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD)
{ {
@ -896,7 +896,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_SetObjectMomZ(thing, 8*FRACUNIT, false); P_SetObjectMomZ(thing, 8*FRACUNIT, false);
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT); P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y)+ANGLE_90, 16*FRACUNIT);
// This Item Damage // This Item Damage
if (tmthing->eflags & MFE_VERTICALFLIP) if (tmthing->eflags & MFE_VERTICALFLIP)
tmthing->z -= tmthing->height; tmthing->z -= tmthing->height;
@ -943,7 +943,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->health <= 0 || thing->health <= 0) if (tmthing->health <= 0 || thing->health <= 0)
return true; return true;
if (thing->type == MT_PLAYER) if (thing->type == MT_PLAYER)
{ {
P_KillMobj(tmthing, thing, thing); P_KillMobj(tmthing, thing, thing);
} }
@ -968,14 +968,14 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true; return true;
} }
else if (tmthing->type == MT_PLAYER && else if (tmthing->type == MT_PLAYER &&
(thing->type == MT_GREENSHIELD || thing->type == MT_GREENITEM (thing->type == MT_GREENSHIELD || thing->type == MT_GREENITEM
|| thing->type == MT_REDSHIELD || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD || thing->type == MT_REDSHIELD || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
|| thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3 || thing->type == MT_TRIPLEGREENSHIELD1 || thing->type == MT_TRIPLEGREENSHIELD2 || thing->type == MT_TRIPLEGREENSHIELD3
|| thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3 || thing->type == MT_TRIPLEREDSHIELD1 || thing->type == MT_TRIPLEREDSHIELD2 || thing->type == MT_TRIPLEREDSHIELD3
|| thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM || thing->type == MT_FAKESHIELD || thing->type == MT_FAKEITEM
|| thing->type == MT_BANANASHIELD || thing->type == MT_BANANAITEM || thing->type == MT_BANANASHIELD || thing->type == MT_BANANAITEM
|| thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3 || thing->type == MT_TRIPLEBANANASHIELD1 || thing->type == MT_TRIPLEBANANASHIELD2 || thing->type == MT_TRIPLEBANANASHIELD3
|| thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM || thing->type == MT_BOMBSHIELD || thing->type == MT_BOMBITEM
|| thing->type == MT_BOMBEXPLOSION || thing->type == MT_BOMBEXPLOSION
|| thing->type == MT_SINK || thing->type == MT_SINK
@ -1090,7 +1090,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
if (tmthing->type == MT_PLAYER && !thing->threshold) if (tmthing->type == MT_PLAYER && !thing->threshold)
P_DamageMobj(tmthing, thing, thing->target, 1); P_DamageMobj(tmthing, thing, thing->target, 1);
} }
//} //}
if ((thing->type == MT_SPRINGSHELL || thing->type == MT_YELLOWSHELL) && thing->health > 0 if ((thing->type == MT_SPRINGSHELL || thing->type == MT_YELLOWSHELL) && thing->health > 0
@ -3572,7 +3572,7 @@ retry:
{ {
mmomx = mo->player->rmomx; mmomx = mo->player->rmomx;
mmomy = mo->player->rmomy; mmomy = mo->player->rmomy;
if (mo->player->kartstuff[k_drift] != 0) // SRB2kart if (mo->player->kartstuff[k_drift] != 0) // SRB2kart
{ {
mo->player->kartstuff[k_drift] = 0; mo->player->kartstuff[k_drift] = 0;

View File

@ -52,7 +52,7 @@ mobj_t *skyboxmo[2];
// Amount (dx, dy) vector linedef is shifted right to get scroll amount // Amount (dx, dy) vector linedef is shifted right to get scroll amount
#define SCROLL_SHIFT 5 #define SCROLL_SHIFT 5
// This must be updated whenever we up the max flat size - quicker to assume rather than figuring out the sqrt of the specific flat's filesize. // This must be updated whenever we up the max flat size - quicker to assume rather than figuring out the sqrt of the specific flat's filesize.
#define MAXFLATSIZE (2048<<FRACBITS) #define MAXFLATSIZE (2048<<FRACBITS)
@ -5691,7 +5691,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
angle_t flatangle = InvAngle(R_PointToAngle2(lines[i].v1->x, lines[i].v1->y, lines[i].v2->x, lines[i].v2->y)); angle_t flatangle = InvAngle(R_PointToAngle2(lines[i].v1->x, lines[i].v1->y, lines[i].v2->x, lines[i].v2->y));
fixed_t xoffs; fixed_t xoffs;
fixed_t yoffs; fixed_t yoffs;
if (lines[i].flags & ML_NOKNUX) // Set offset through x and y texture offsets if NOKNUX flag is set if (lines[i].flags & ML_NOKNUX) // Set offset through x and y texture offsets if NOKNUX flag is set
{ {
xoffs = sides[lines[i].sidenum[0]].textureoffset; xoffs = sides[lines[i].sidenum[0]].textureoffset;
@ -5704,7 +5704,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
xoffs = (-FixedMul(lines[i].v1->x, cosinecomponent) % MAXFLATSIZE) + (FixedMul(lines[i].v1->y, sinecomponent) % MAXFLATSIZE); // No danger of overflow thanks to the strategically placed modulo operations. xoffs = (-FixedMul(lines[i].v1->x, cosinecomponent) % MAXFLATSIZE) + (FixedMul(lines[i].v1->y, sinecomponent) % MAXFLATSIZE); // No danger of overflow thanks to the strategically placed modulo operations.
yoffs = (FixedMul(lines[i].v1->x, sinecomponent) % MAXFLATSIZE) + (FixedMul(lines[i].v1->y, cosinecomponent) % MAXFLATSIZE); // Ditto. yoffs = (FixedMul(lines[i].v1->x, sinecomponent) % MAXFLATSIZE) + (FixedMul(lines[i].v1->y, cosinecomponent) % MAXFLATSIZE); // Ditto.
} }
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;) for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
{ {
if (!(lines[i].flags & ML_NOSONIC)) // Modify floor flat alignment unless NOSONIC flag is set if (!(lines[i].flags & ML_NOSONIC)) // Modify floor flat alignment unless NOSONIC flag is set
@ -5716,7 +5716,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
sectors[s].spawn_flr_xoffs = sectors[s].floor_xoffs; sectors[s].spawn_flr_xoffs = sectors[s].floor_xoffs;
sectors[s].spawn_flr_yoffs = sectors[s].floor_yoffs; sectors[s].spawn_flr_yoffs = sectors[s].floor_yoffs;
} }
if (!(lines[i].flags & ML_NOTAILS)) // Modify ceiling flat alignment unless NOTAILS flag is set if (!(lines[i].flags & ML_NOTAILS)) // Modify ceiling flat alignment unless NOTAILS flag is set
{ {
sectors[s].spawn_ceilpic_angle = sectors[s].ceilingpic_angle = flatangle; sectors[s].spawn_ceilpic_angle = sectors[s].ceilingpic_angle = flatangle;
@ -5733,7 +5733,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
M_GetText("Flat alignment linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"), M_GetText("Flat alignment linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"),
lines[i].tag); lines[i].tag);
break; break;
case 8: // Sector Parameters case 8: // Sector Parameters
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;) for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
{ {
@ -7112,8 +7112,8 @@ void T_Friction(friction_t *f)
// apparently, all I had to do was comment out part of the next line and // apparently, all I had to do was comment out part of the next line and
// friction works for all mobj's // friction works for all mobj's
// (or at least MF_PUSHABLEs, which is all I care about anyway) // (or at least MF_PUSHABLEs, which is all I care about anyway)
if ((!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) && thing->z == thing->floorz) && (thing->player if ((!(thing->flags & (MF_NOGRAVITY | MF_NOCLIP)) && thing->z == thing->floorz) && (thing->player
&& (thing->player->kartstuff[k_startimer] && thing->player->kartstuff[k_bootaketimer] && (thing->player->kartstuff[k_startimer] && thing->player->kartstuff[k_bootaketimer]
&& thing->player->kartstuff[k_mushroomtimer] && thing->player->kartstuff[k_growshrinktimer] <= 0))) && thing->player->kartstuff[k_mushroomtimer] && thing->player->kartstuff[k_growshrinktimer] <= 0)))
{ {
if (f->roverfriction) if (f->roverfriction)

View File

@ -3556,7 +3556,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
if (!player->jumpfactor) if (!player->jumpfactor)
return; return;
if (player->kartstuff[k_spinouttimer]) // SRB2kart if (player->kartstuff[k_spinouttimer]) // SRB2kart
return; return;
@ -4647,7 +4647,7 @@ static void P_3dMovement(player_t *player)
topspeed = normalspd; topspeed = normalspd;
acceleration = 2*acceleration/3; acceleration = 2*acceleration/3;
}*/ }*/
if (cmd->forwardmove < 0) if (cmd->forwardmove < 0)
topspeed = 5<<16; topspeed = 5<<16;
else else
@ -6393,8 +6393,8 @@ static void P_MovePlayer(player_t *player)
cmd = &player->cmd; cmd = &player->cmd;
runspd = FixedMul(player->runspeed, player->mo->scale); runspd = FixedMul(player->runspeed, player->mo->scale);
// Let's have some movement speed fun on low-friction surfaces, JUST for players... // Let's have some movement speed fun on low-friction surfaces, JUST for players...
// (high friction surfaces shouldn't have any adjustment, since the acceleration in // (high friction surfaces shouldn't have any adjustment, since the acceleration in
// this game is super high and that ends up cheesing high-friction surfaces.) // this game is super high and that ends up cheesing high-friction surfaces.)
runspd = FixedMul(runspd, player->mo->movefactor); runspd = FixedMul(runspd, player->mo->movefactor);
@ -6669,7 +6669,7 @@ static void P_MovePlayer(player_t *player)
S_StopSoundByID(player->mo, sfx_mkdrft); S_StopSoundByID(player->mo, sfx_mkdrft);
} }
} }
K_MoveKartPlayer(player, cmd, onground); K_MoveKartPlayer(player, cmd, onground);
//} //}
@ -9319,7 +9319,7 @@ void P_PlayerThink(player_t *player)
} }
player->pflags &= ~PF_SLIDING; player->pflags &= ~PF_SLIDING;
K_KartPlayerThink(player, cmd); // SRB2kart K_KartPlayerThink(player, cmd); // SRB2kart
/* /*

View File

@ -859,17 +859,6 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
leftheight -= viewz; leftheight -= viewz;
rightheight -= viewz; rightheight -= viewz;
if (leftheight > pfloorleft && rightheight > pfloorright && i+1 < dc_numlights)
{
lightlist_t *nextlight = &frontsector->lightlist[i+1];
if (nextlight->slope ? P_GetZAt(nextlight->slope, ds->leftpos.x, ds->leftpos.y) : nextlight->height > pfloorleft
&& nextlight->slope ? P_GetZAt(nextlight->slope, ds->rightpos.x, ds->rightpos.y) : nextlight->height > pfloorright)
continue;
}
leftheight -= viewz;
rightheight -= viewz;
overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS); overflow_test = (INT64)centeryfrac - (((INT64)leftheight*ds->scale1)>>FRACBITS);
if (overflow_test < 0) overflow_test = -overflow_test; if (overflow_test < 0) overflow_test = -overflow_test;
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) continue; if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) continue;

View File

@ -465,7 +465,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"s3kdal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3kdal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kdbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3kdbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kdbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"s3kdbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2kart // SRB2kart
{"lkt1", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"lkt1", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"lkt2", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"lkt2", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},