diff --git a/src/doomdef.h b/src/doomdef.h
index fb8ab1ca270aa10d6adc856665f79f762ccfa79c..7d883849d0889d0d132542df2803ab6659c2d313 100644
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -495,4 +495,8 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
 /// \note	You should leave this enabled unless you're working with a future SRB2 version.
 #define MUSICSLOT_COMPATIBILITY
 
+/// Handle touching sector specials in P_PlayerAfterThink instead of P_PlayerThink.
+/// \note   Required for proper collision with moving sloped surfaces that have sector specials on them.
+#define SECTORSPECIALSAFTERTHINK
+
 #endif // __DOOMDEF__
diff --git a/src/p_user.c b/src/p_user.c
index 801eb595192426b37c3be726d0fadb47b1715952..921f1240d1416f0a6c14d6aa9e70667ca659655b 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -8779,6 +8779,7 @@ void P_PlayerThink(player_t *player)
 	// check water content, set stuff in mobj
 	P_MobjCheckWater(player->mo);
 
+#ifndef SECTORSPECIALSAFTERTHINK
 #ifdef POLYOBJECTS
 	if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
 #endif
@@ -8787,6 +8788,7 @@ void P_PlayerThink(player_t *player)
 
 	if (!player->spectator)
 		P_PlayerInSpecialSector(player);
+#endif
 
 	if (player->playerstate == PST_DEAD)
 	{
@@ -9148,6 +9150,17 @@ void P_PlayerAfterThink(player_t *player)
 
 	cmd = &player->cmd;
 
+#ifdef SECTORSPECIALSAFTERTHINK
+#ifdef POLYOBJECTS
+	if (player->onconveyor != 1 || !P_IsObjectOnGround(player->mo))
+#endif
+	player->onconveyor = 0;
+	// check special sectors : damage & secrets
+
+	if (!player->spectator)
+		P_PlayerInSpecialSector(player);
+#endif
+
 	if (splitscreen && player == &players[secondarydisplayplayer])
 		thiscam = &camera2;
 	else if (player == &players[displayplayer])