diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp
index 4c36dd38c..4917cd0cc 100644
--- a/source/games/sw/src/actor.cpp
+++ b/source/games/sw/src/actor.cpp
@@ -1106,12 +1106,14 @@ void DSWActor::callStateAction()
 
 int DSWActor::callFunction(VMFunction* func)
 {
+    int ret = 0;
     if (func)
     {
         VMValue param[] = { this };
-        VMCall(func, param, 1, nullptr, 0);
+        VMReturn r(&ret);
+        VMCall(func, param, 1, &r, 1);
     }
-    return 0;
+    return ret;
 }
 
 END_SW_NS
diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h
index 89eab0cd5..e458549b6 100644
--- a/source/games/sw/src/game.h
+++ b/source/games/sw/src/game.h
@@ -350,8 +350,7 @@ typedef void (*soANIMATORp) (SECTOR_OBJECT*);
     DEFINE_ACTION_FUNCTION_NATIVE(DSWActor, func, func) \
     { \
         auto self = (DSWActor *)(param[0].a); \
-        func(self); \
-        return 0; \
+        ACTION_RETURN_INT(func(self)); \
     }
 #define AF(func) &DSWActor_##func##_VMPtr