diff --git a/src/p_mobj.c b/src/p_mobj.c
index bff4bb09c31ea7398f4c8693f6d4ffb825e65282..22d06e34d460eeb2165b37c225f7a93bca0b17d6 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -167,6 +167,12 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
 	if ((state == S_PLAY_JUMP) && (player->charflags & SF_NOJUMPSPIN) && (P_MobjFlip(mobj)*mobj->momz < 0 || player->pflags & PF_THOKKED))
 		return P_SetPlayerMobjState(mobj, S_PLAY_FALL);
 
+	// Catch swimming versus flying
+	if (state == S_PLAY_FLY && player->mo->eflags & MFE_UNDERWATER)
+		return P_SetPlayerMobjState(player->mo, S_PLAY_SWIM);
+	else if (state == S_PLAY_SWIM && !(player->mo->eflags & MFE_UNDERWATER))
+		return P_SetPlayerMobjState(player->mo, S_PLAY_FLY);
+
 	// Catch state changes for Super Sonic
 	if (player->powers[pw_super] && (player->charflags & SF_SUPERANIMS))
 	{
diff --git a/src/p_user.c b/src/p_user.c
index f624d3b10223eac021282077495feecffb00eeda..ce6c01d9494bb1bea888fffa51e4d1ae3fcaf89a 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -4111,10 +4111,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
 						; // Can't do anything if you're a fish out of water!
 					else if (!(player->pflags & PF_THOKKED) && !(player->powers[pw_tailsfly]))
 					{
-						if (player->mo->eflags & MFE_UNDERWATER)
-							P_SetPlayerMobjState(player->mo, S_PLAY_SWIM); // Change to the swimming animation
-						else
-							P_SetPlayerMobjState(player->mo, S_PLAY_FLY); // Change to the flying animation
+						P_SetPlayerMobjState(player->mo, S_PLAY_FLY); // Change to the flying animation
 
 						player->powers[pw_tailsfly] = tailsflytics + 1; // Set the fly timer
 
@@ -6737,14 +6734,6 @@ static void P_MovePlayer(player_t *player)
 	if (player->panim != PA_ABILITY)
 		player->powers[pw_tailsfly] = 0;
 
-	if (player->charability == CA_FLY || player->charability == CA_SWIM) // Frustratingly has to remain seperate from the below block.
-	{
-		if (player->mo->state-states == S_PLAY_FLY && player->mo->eflags & MFE_UNDERWATER)
-			P_SetPlayerMobjState(player->mo, S_PLAY_SWIM); // Change to the swimming animation
-		else if (player->mo->state-states == S_PLAY_SWIM && !(player->mo->eflags & MFE_UNDERWATER))
-			P_SetPlayerMobjState(player->mo, S_PLAY_FLY); // Change to the flying animation
-	}
-
 	if (player->charability == CA_FLY || (player->charability == CA_SWIM && player->mo->eflags & MFE_UNDERWATER))
 	{
 		// Fly counter for Tails.