diff --git a/tpl/macro.twig b/tpl/macro.twig index 7dc8b55..756a9da 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -542,7 +542,7 @@ public class {{o.name}} : IRpc { {%- if f.type.value is instanceof('\\mtgMetaStruct') ~%} var tmp_{{f.name}} = a.{{f.name}}[i]; - if(!IsEqual(ref tmp_{{f.name}}, b.{{f.name}}[i])) + if(!{{_self.compare_func_name(f.type.value)}}(ref tmp_{{f.name}}, b.{{f.name}}[i])) { MetaIO.SetFieldDirty(ref a.fields_mask, {{field_idx}}); is_equal = false; @@ -567,7 +567,7 @@ public class {{o.name}} : IRpc { {%- if f.type.value is instanceof('\\mtgMetaStruct') ~%} var tmp_{{f.name}} = a.{{f.name}}[i]; - if(!IsEqual(ref tmp_{{f.name}}, b.{{f.name}}[i])) + if(!{{_self.compare_func_name(f.type.value)}}(ref tmp_{{f.name}}, b.{{f.name}}[i])) return false; {%- else -%} if(a.{{f.name}}[i] != b.{{f.name}}[i]) @@ -578,7 +578,7 @@ public class {{o.name}} : IRpc {% elseif f.type is instanceof('\\mtgMetaStruct') ~%} var tmp_{{f.name}} = a.{{f.name}}[i]; - if(!IsEqual(ref tmp_{{f.name}}, b.{{f.name}})) + if(!{{_self.compare_func_name(f.type.value)}}(ref tmp_{{f.name}}, b.{{f.name}})) {% if has_token(o, 'bitfields') ~%} { MetaIO.SetFieldDirty(ref a.fields_mask, {{field_idx}});