From 22fd9409ff6070dedc50ba5d072ea4796c2f02d6 Mon Sep 17 00:00:00 2001 From: BaerMitUmlaut Date: Mon, 9 Nov 2020 23:16:35 +0100 Subject: [PATCH] Fix statemachine conditions using global variables --- addons/statemachine/script_component.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/statemachine/script_component.hpp b/addons/statemachine/script_component.hpp index bb3c66eba..159e27563 100644 --- a/addons/statemachine/script_component.hpp +++ b/addons/statemachine/script_component.hpp @@ -20,7 +20,7 @@ #define ONSTATEENTERED(var) (var + "_onStateEntered") #define ONSTATELEAVING(var) (var + "_onStateLeaving") #define GET_FUNCTION(var,cfg) private var = getText (cfg); \ - if (isNil var) then { \ + if (isNil var || {!((missionNamespace getVariable var) isEqualType {})}) then { \ var = compile var; \ } else { \ var = missionNamespace getVariable var;\