diff --git a/src/command.c b/src/command.c
index 690b6f30342d9d1318a7ba719eecd1f4023579f6..a406028588cf2695e01809f5dcc4e5316b44f9bf 100644
--- a/src/command.c
+++ b/src/command.c
@@ -64,10 +64,10 @@ CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
 
 //SRB2kart
 CV_PossibleValue_t karthud_cons_t[] = {
-	{0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"}, 
+	{0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"},
 	{0, NULL}};
 CV_PossibleValue_t kartcc_cons_t[] = {
-	{50, "50cc"}, {100, "100cc"}, {150, "150cc"}, {200, "200cc"}, 
+	{50, "50cc"}, {100, "100cc"}, {150, "150cc"}, {200, "200cc"},
 	{0, NULL}};
 
 #define COM_BUF_SIZE 8192 // command buffer size
diff --git a/src/d_netcmd.c b/src/d_netcmd.c
index 5d2d12c8da51c087dac995f3c12b0b94bbfb7c49..b97ac70ba8796b7c6309bb2d74270c2e3d4bd2f0 100644
--- a/src/d_netcmd.c
+++ b/src/d_netcmd.c
@@ -554,7 +554,7 @@ void D_RegisterServerCommands(void)
 	CV_RegisterVar(&cv_bombshield);
 	CV_RegisterVar(&cv_1up);
 	CV_RegisterVar(&cv_eggmanbox);
-	
+
 	K_RegisterKartStuff(); // SRB2kart
 
 	CV_RegisterVar(&cv_ringslinger);
diff --git a/src/doomstat.h b/src/doomstat.h
index 8ac5e5baa852bcb313f65804aeeaad4cf1a7bd21..2ca0b33071fc1e1f4c8dfecab4a360e21cf3fe3f 100644
--- a/src/doomstat.h
+++ b/src/doomstat.h
@@ -249,7 +249,7 @@ typedef struct
 	// (This is not ifdeffed so the map header structure can stay identical, just in case.)
 	UINT8 numCustomOptions;     ///< Internal. For Lua custom value support.
 	customoption_t *customopts; ///< Custom options. Allocated dynamically for space reasons. Be careful.
-	
+
 	// SRB2kart
 	boolean automap;      ///< Displays a level's white map outline in modified games
 } mapheader_t;
diff --git a/src/g_game.c b/src/g_game.c
index bb0667d8fc9b015fce2edf2a2ee9e27c4c4d2ad6..78a02f4f4a1731ee43d27ff2911f9fca4d789d49 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1248,12 +1248,12 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
 
 	//{ SRB2kart - Drift support
 	axis = JoyAxis(AXISTURN);
-	
+
 	if (turnleft || axis < 0) // Drifting to the left
 		cmd->buttons |= BT_DRIFTLEFT;
 	else
 		cmd->buttons &= ~BT_DRIFTLEFT;
-	
+
 	if (turnright || axis > 0) // Drifting to the right
 		cmd->buttons |= BT_DRIFTRIGHT;
 	else
@@ -1269,13 +1269,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
 	{
 		// SRB2kart
 		INT32 turnspeed;
-		
+
 		if (players[consoleplayer].mo && (players[consoleplayer].speed == 0))
 			turnspeed = 0;
 		else
 			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)
 			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
 	axis = Joy2Axis(AXISTURN);
-	
+
 	if (turnleft || axis < 0) // Drifting to the left
 		cmd->buttons |= BT_DRIFTLEFT;
 	else
 		cmd->buttons &= ~BT_DRIFTLEFT;
-	
+
 	if (turnright || axis > 0) // Drifting to the right
 		cmd->buttons |= BT_DRIFTRIGHT;
 	else
 		cmd->buttons &= ~BT_DRIFTRIGHT;
-	
+
 	if (turnright && turnleft)
 	{
 		cmd->buttons &= ~BT_DRIFTLEFT;
@@ -2015,10 +2015,10 @@ void G_Ticker(boolean run)
 	for (i = 0; i < MAXPLAYERS; i++)
 	{
 		cmd = &players[i].cmd;
-		
+
 		if (playeringame[i])
 			G_CopyTiccmd(cmd, &netcmds[buf][i], 1);
-			
+
 			// SRB2kart
 			// Save the dir the player is holding
 			//  to allow items to be thrown forward or backward.
@@ -2337,7 +2337,7 @@ void G_PlayerReborn(INT32 player)
 				S_SpeedMusic(1.2f);
 		}
 	}
-	
+
 	if (gametype == GT_COOP)
 		P_FindEmerald(); // scan for emeralds to hunt for
 
diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c
index 2952cfbcace12bc5f2f1286b8653ada930b4cb8d..75b4ea4b024ebdd45cfb9e277e4411c6e4cd8196 100644
--- a/src/hardware/hw_md2.c
+++ b/src/hardware/hw_md2.c
@@ -1178,9 +1178,6 @@ static void HWR_GetBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, con
 
 	HWD.pfnSetTexture(newmip);
 	Z_ChangeTag(newmip->grInfo.data, PU_HWRCACHE_UNLOCKED);
-
-	HWD.pfnSetTexture(newmip);
-	Z_ChangeTag(newmip->grInfo.data, PU_HWRCACHE_UNLOCKED);
 }
 
 
diff --git a/src/hu_stuff.c b/src/hu_stuff.c
index 71e5dcb61da8924aaa64d55363f71960ff17bc4b..857094ab5790c9a0a14b6b921df8a6f01c596a64 100644
--- a/src/hu_stuff.c
+++ b/src/hu_stuff.c
@@ -1120,7 +1120,7 @@ void HU_Drawer(void)
 					// it, they wouldn't 'spawn' on the top-right side of the HUD.
 					amnumxpos = (players[i].mo->x / 320) >> FRACBITS;
 					amnumypos = (-players[i].mo->y / 340) >> FRACBITS;
-					
+
 					amxpos = (x + amnumxpos) - (iconprefix[players[i].skin]->width/4);
 					amypos = (y + amnumypos) - (iconprefix[players[i].skin]->height/4);
 
@@ -1141,7 +1141,7 @@ void HU_Drawer(void)
 	}
 	*/
 	//
-	
+
 	// draw chat string plus cursor
 	if (chat_on)
 		HU_DrawChat();
@@ -1358,9 +1358,9 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
 			if (circuitmap)
 			{
 				if (players[tab[i].num].exiting)
-					V_DrawRightAlignedString(x+240, y, V_YELLOWMAP, va("%d:%02d.%02d", 
-						players[tab[i].num].realtime/(60*TICRATE), 
-						players[tab[i].num].realtime/TICRATE % 60, 
+					V_DrawRightAlignedString(x+240, y, V_YELLOWMAP, va("%d:%02d.%02d",
+						players[tab[i].num].realtime/(60*TICRATE),
+						players[tab[i].num].realtime/TICRATE % 60,
 						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)));
 				else
diff --git a/src/info.h b/src/info.h
index 4af684e6fb9982ef42786f33abf9a0885f159ced..91df575ada1acebbbceeee913f84d4ded1fa868f 100644
--- a/src/info.h
+++ b/src/info.h
@@ -577,13 +577,13 @@ typedef enum sprite
 	// Springs
 	SPR_SPRG, // Gray Spring
 	SPR_BSPR, // Blue Diagonal Spring
-	
+
 	SPR_RNDM, // Random Item Box
 	SPR_RPOP, // Random Item Box Pop
 	SPR_KFRE, // Mushroom fire trail
 	SPR_DRIF, // Drift Sparks
 	SPR_DSMO, // Drift Smoke
-	
+
 	// Kart Items
 	SPR_FITE, // Fake Item box
 	SPR_DFAK, // Dead Fake Item
@@ -600,7 +600,7 @@ typedef enum sprite
 	SPR_LIGH, // Lightning
 	SPR_SINK, // Kitchen Sink
 	SPR_SITR, // Kitchen Sink Trail
-	
+
 	// Additional Kart Objects
 	SPR_POKE, // Lightning
 
diff --git a/src/p_enemy.c b/src/p_enemy.c
index 3ade7f57741bdc83d112e94bb70dfb368af4d453..89295b12943866f9950e047f789076abed55e4d6 100644
--- a/src/p_enemy.c
+++ b/src/p_enemy.c
@@ -8269,7 +8269,7 @@ void A_BobombExplode(mobj_t *actor)
 			else
 				P_DamageMobj(mo2, actor, actor->target, 1);
 
-			
+
 
 			continue;
 		}
diff --git a/src/p_inter.c b/src/p_inter.c
index 187404e757560a63e0b65745d7d9d6abd5477b2d..8d7e17806a061bf156490409013643983b19d381 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -1438,7 +1438,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
 			}
 			return;
 
-		case MT_EXTRALARGEBUBBLE: 
+		case MT_EXTRALARGEBUBBLE:
 			return; // SRB2kart - don't need bubbles mucking with the player
 			if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ELEMENTAL)
 				return;
@@ -1463,7 +1463,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
 			if (player->powers[pw_underwater] < underwatertics + 1)
 				player->powers[pw_underwater] = underwatertics + 1;
 
-			/* 
+			/*
 			if (!player->climbing)
 			{
 				P_SetPlayerMobjState(toucher, S_PLAY_GASP);
@@ -2068,11 +2068,11 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
 
 	// SRB2kart
 	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_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_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_FAKEITEM || target->type == MT_FAKESHIELD)) // kart dead items
 		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.
 	if (player->charflags & SF_SUPERANIMS)
-		P_SetPlayerMobjState(player->mo, S_PLAY_SUPERHIT); 
+		P_SetPlayerMobjState(player->mo, S_PLAY_SUPERHIT);
 	else
 	*/
 		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
-		
+
 		player->kartstuff[k_mushroomtimer] = 0;
-		
+
 		// Thunder
 		if (damage == 64 && player != source->player)
 		{
diff --git a/src/p_map.c b/src/p_map.c
index 7460ef16b03ea5cd9814ae6763ce69848d366de1..58fc95009def55192d3c7147c6db8a739258645b 100644
--- a/src/p_map.c
+++ b/src/p_map.c
@@ -563,10 +563,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
 	}
 
 	// SRB2kart 011617 - Colission code for kart items //{
-	
-	if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD || 
-		tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD || 
-		tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3 || 
+
+	if (tmthing->type == MT_GREENITEM || tmthing->type == MT_REDITEM || tmthing->type == MT_REDITEMDUD ||
+		tmthing->type == MT_GREENSHIELD || tmthing->type == MT_REDSHIELD ||
+		tmthing->type == MT_TRIPLEGREENSHIELD1 || tmthing->type == MT_TRIPLEGREENSHIELD2 || tmthing->type == MT_TRIPLEGREENSHIELD3 ||
 		tmthing->type == MT_TRIPLEREDSHIELD1 || tmthing->type == MT_TRIPLEREDSHIELD2 || tmthing->type == MT_TRIPLEREDSHIELD3)
 	{
 		// see if it went over / under
@@ -625,7 +625,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);
-			
+
 
 			// This Item Damage
 			if (tmthing->eflags & MFE_VERTICALFLIP)
@@ -657,7 +657,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
 				P_SetObjectMomZ(tmthing, 8*FRACUNIT, false);
 				P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y)+ANGLE_90, 16*FRACUNIT);
 			}
-			
+
 			// Other Item Damage
 			if (thing->eflags & MFE_VERTICALFLIP)
 				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.
 	}
-	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)
 	{
 		// see if it went over / under
@@ -804,7 +804,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);
-			
+
 			// This Item Damage
 			if (tmthing->eflags & MFE_VERTICALFLIP)
 				tmthing->z -= tmthing->height;
@@ -863,7 +863,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
 			return true;
 
 		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_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
 			|| 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_FAKEITEM || thing->type == MT_FAKESHIELD)
 		{
@@ -896,7 +896,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);
-			
+
 			// This Item Damage
 			if (tmthing->eflags & MFE_VERTICALFLIP)
 				tmthing->z -= tmthing->height;
@@ -943,7 +943,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
 		if (tmthing->health <= 0 || thing->health <= 0)
 			return true;
 
-		if (thing->type == MT_PLAYER) 
+		if (thing->type == MT_PLAYER)
 		{
 			P_KillMobj(tmthing, thing, thing);
 		}
@@ -968,14 +968,14 @@ static boolean PIT_CheckThing(mobj_t *thing)
 
 		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_REDSHIELD || thing->type == MT_REDITEM || thing->type == MT_REDITEMDUD
 			|| 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_FAKESHIELD || thing->type == MT_FAKEITEM
 			|| 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_BOMBEXPLOSION
 			|| thing->type == MT_SINK
@@ -1090,7 +1090,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
 		if (tmthing->type == MT_PLAYER && !thing->threshold)
 			P_DamageMobj(tmthing, thing, thing->target, 1);
 	}
-	
+
 	//}
 
 	if ((thing->type == MT_SPRINGSHELL || thing->type == MT_YELLOWSHELL) && thing->health > 0
@@ -3572,7 +3572,7 @@ retry:
 	{
 		mmomx = mo->player->rmomx;
 		mmomy = mo->player->rmomy;
-		
+
 		if (mo->player->kartstuff[k_drift] != 0) // SRB2kart
 		{
 			mo->player->kartstuff[k_drift] = 0;
diff --git a/src/p_spec.c b/src/p_spec.c
index a88bb4c3ac881cb9bacf7efc9e7dfd19d89cb2b5..131dd7c8f52614b8e99a9d448dae79b48f0e083b 100644
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -52,7 +52,7 @@ mobj_t *skyboxmo[2];
 
 // Amount (dx, dy) vector linedef is shifted right to get scroll amount
 #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.
 #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));
 					fixed_t xoffs;
 					fixed_t yoffs;
- 
+
 					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;
@@ -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.
 						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 ;)
 					{
 						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_yoffs = sectors[s].floor_yoffs;
 						}
- 
+
 						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;
@@ -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"),
 					lines[i].tag);
 				break;
- 
+
 			case 8: // Sector Parameters
 				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
 		// friction works for all mobj's
 		// (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 
-			&& (thing->player->kartstuff[k_startimer] && thing->player->kartstuff[k_bootaketimer] 
+		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_mushroomtimer] && thing->player->kartstuff[k_growshrinktimer] <= 0)))
 		{
 			if (f->roverfriction)
diff --git a/src/p_user.c b/src/p_user.c
index 78d8803b9d38461770f81cb109472c728ff8c53a..58d2c7d30c4b29e92ec9203a55f01a8498f5e032 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -3556,7 +3556,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
 
 	if (!player->jumpfactor)
 		return;
-	
+
 	if (player->kartstuff[k_spinouttimer]) // SRB2kart
 		return;
 
@@ -4647,7 +4647,7 @@ static void P_3dMovement(player_t *player)
 			topspeed = normalspd;
 			acceleration = 2*acceleration/3;
 		}*/
-		
+
 		if (cmd->forwardmove < 0)
 			topspeed = 5<<16;
 		else
@@ -6393,8 +6393,8 @@ static void P_MovePlayer(player_t *player)
 	cmd = &player->cmd;
 	runspd = FixedMul(player->runspeed, player->mo->scale);
 
-	// 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 
+	// 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
 	// this game is super high and that ends up cheesing high-friction surfaces.)
 	runspd = FixedMul(runspd, player->mo->movefactor);
 
@@ -6669,7 +6669,7 @@ static void P_MovePlayer(player_t *player)
 				S_StopSoundByID(player->mo, sfx_mkdrft);
 		}
 	}
-	
+
 	K_MoveKartPlayer(player, cmd, onground);
 	//}
 
@@ -9319,7 +9319,7 @@ void P_PlayerThink(player_t *player)
 	}
 
 	player->pflags &= ~PF_SLIDING;
-	
+
 	K_KartPlayerThink(player, cmd); // SRB2kart
 
 /*
diff --git a/src/r_segs.c b/src/r_segs.c
index 02f0cf6f65beae103f91fdeb4911f8fd2bf79777..502ff3304dab17ec4f54283608ee33fb74145b60 100644
--- a/src/r_segs.c
+++ b/src/r_segs.c
@@ -859,17 +859,6 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
 			leftheight -= 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);
 			if (overflow_test < 0) overflow_test = -overflow_test;
 			if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) continue;
diff --git a/src/sounds.c b/src/sounds.c
index c73d8cb436d2e1a3cd3014038789859d3833134c..838acfc37ae7f5e00b77db55add9bfefa9f63617 100644
--- a/src/sounds.c
+++ b/src/sounds.c
@@ -465,7 +465,7 @@ sfxinfo_t S_sfx[NUMSFX] =
   {"s3kdal", 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},
-  
+
   // SRB2kart
   {"lkt1",    true, 127,  0, -1, NULL, 0,        -1,  -1, LUMPERROR},
   {"lkt2",    true, 127,  0, -1, NULL, 0,        -1,  -1, LUMPERROR},