Fix RCS1061

This commit is contained in:
RoosterDragon
2023-03-18 12:16:52 +00:00
committed by Gustas
parent 5d91b678bb
commit 4dd787be13
32 changed files with 167 additions and 210 deletions

View File

@@ -40,13 +40,10 @@ namespace OpenRA.Scripting
t = nullable;
// Value wraps a CLR object
if (value.TryGetClrObject(out var temp))
if (value.TryGetClrObject(out var temp) && temp.GetType() == t)
{
if (temp.GetType() == t)
{
clrObject = temp;
return true;
}
clrObject = temp;
return true;
}
if (value is LuaNil && !t.IsValueType)