diff --git a/src/m_cheat.c b/src/m_cheat.c
index ae2703ee263599775adf794bcfd5c383ecf1a009..bb757839aeb140105b3d06f335a19691bffc2099 100644
--- a/src/m_cheat.c
+++ b/src/m_cheat.c
@@ -833,7 +833,10 @@ void Command_Savecheckpoint_f(void)
 	players[consoleplayer].starpostangle = players[consoleplayer].mo->angle;
 	players[consoleplayer].starpostscale = players[consoleplayer].mo->destscale;
 	if (players[consoleplayer].mo->flags2 & MF2_OBJECTFLIP)
+	{
 		players[consoleplayer].starpostscale *= -1;
+		players[consoleplayer].starpostz += players[consoleplayer].mo->height;
+	}
 
 	CONS_Printf(M_GetText("Temporary checkpoint created at %d, %d, %d\n"), players[consoleplayer].starpostx, players[consoleplayer].starposty, players[consoleplayer].starpostz);
 }
diff --git a/src/p_inter.c b/src/p_inter.c
index 53481d6c5e7a4dd9d4000134c21b9e251a8090f9..cc9250e42b91840d20cf4cdec8169fb23bc4ae64 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -1431,7 +1431,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
 						if (special->flags2 & MF2_OBJECTFLIP)
 						{
 							players[i].starpostscale *= -1;
-							players[i].starpostz += (special->height - P_GetPlayerHeight(player))>>FRACBITS;
+							players[i].starpostz += special->height>>FRACBITS;
 						}
 						players[i].starpostnum = special->health;
 
@@ -1453,7 +1453,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
 				if (special->flags2 & MF2_OBJECTFLIP)
 				{
 					player->starpostscale *= -1;
-					player->starpostz += (special->height - P_GetPlayerHeight(player))>>FRACBITS;
+					player->starpostz += special->height>>FRACBITS;
 				}
 				player->starpostnum = special->health;
 				S_StartSound(toucher, special->info->painsound);
diff --git a/src/p_mobj.c b/src/p_mobj.c
index 1308087129779289a722f6d92b19d85b77bc1dfc..5843b9f43b30b2b36b2b6aa8bf41790fe9f0cb18 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -10669,24 +10669,26 @@ void P_MovePlayerToStarpost(INT32 playernum)
 
 	P_SetScale(mobj, (mobj->destscale = abs(p->starpostscale)));
 
-	mobj->floorz = floor;
-	mobj->ceilingz = ceiling;
-
-	if (z <= floor)
-		z = floor;
-	else if (z >= ceiling - mobj->height)
-		z = ceiling - mobj->height;
-
-	mobj->z = z;
-
 	if (p->starpostscale < 0)
 	{
 		mobj->flags2 |= MF2_OBJECTFLIP;
-		if (mobj->z + mobj->height == mobj->ceilingz)
+		if (z >= ceiling)
+		{
 			mobj->eflags |= MFE_ONGROUND;
+			z = ceiling;
+		}
+		z -= mobj->height;
 	}
-	else if (mobj->z == mobj->floorz)
+	else if (z <= floor)
+	{
 		mobj->eflags |= MFE_ONGROUND;
+		z = floor;
+	}
+
+	mobj->floorz = floor;
+	mobj->ceilingz = ceiling;
+
+	mobj->z = z;
 
 	mobj->angle = p->starpostangle;