From 4d0ef730585b2791a3916a47887051f07e528b75 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Sun, 18 Mar 2018 02:49:02 +0100 Subject: DTCallback: Change order of fast and target parameter for Object/DefinitionCallback Use DTCallbackCompatibility for backwards compatibility --- DTCallbackCompatibility.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 DTCallbackCompatibility.c (limited to 'DTCallbackCompatibility.c') diff --git a/DTCallbackCompatibility.c b/DTCallbackCompatibility.c new file mode 100644 index 0000000..d408954 --- /dev/null +++ b/DTCallbackCompatibility.c @@ -0,0 +1,27 @@ +#strict 2 + +// NOTE: Make sure this is loaded after DTCallback.c and overloads the original functions + +global func ObjectCallback(string name, targetOrFast, bool fast) +{ + if(GetType(targetOrFast) == C4V_C4Object) + { + return _inherited(name, fast, targetOrFast); + } + else + { + return _inherited(name, targetOrFast, fast); + } +} + +global func DefinitionCallback(string name, targetOrFast, bool fast) +{ + if(GetType(targetOrFast) == C4V_C4ID) + { + return _inherited(name, fast, targetOrFast); + } + else + { + return _inherited(name, targetOrFast, fast); + } +} -- cgit v1.2.3-54-g00ecf