From 21eb23ad1582416f7592d6f365802120df4d56bb Mon Sep 17 00:00:00 2001
From: "alexey.lysiuk" <alexey.lysiuk@gmail.com>
Date: Sat, 12 Jan 2019 12:21:34 +0200
Subject: [PATCH] - relaxed caller type check for states modified by Dehacked

https://forum.zdoom.org/viewtopic.php?t=63178
---
 src/info.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/info.cpp b/src/info.cpp
index 91a9b6695..57f551c59 100644
--- a/src/info.cpp
+++ b/src/info.cpp
@@ -135,7 +135,7 @@ void FState::CheckCallerType(AActor *self, AActor *stateowner)
 		{
 			ThrowAbortException(X_OTHER, "%s called without valid caller. %s expected", ActionFunc->PrintableName.GetChars(), cls->TypeName.GetChars());
 		}
-		if (!check->IsKindOf(cls))
+		if (!(StateFlags & STF_DEHACKED) && !check->IsKindOf(cls))
 		{
 			ThrowAbortException(X_OTHER, "Invalid class %s in function call to %s. %s expected", check->GetClass()->TypeName.GetChars(), ActionFunc->PrintableName.GetChars(), cls->TypeName.GetChars());
 		}