Fix ScriptCall missing default arguments

There was one VMCall in DLevelScript::ScriptCall that didn't use default arguments. This was causing assertion failures in the GZDoom debug build when trying to run Wolfenstein: Blade of Agony on any map that wasn't TITLEMAP, because ACSTools.FindInventoryClass returns a boolean, and it has a default argument.
This commit is contained in:
Kevin Caccamo 2021-01-15 12:30:44 -05:00 committed by Christoph Oelckers
parent 44b4359ba5
commit 26eac560dd

View file

@ -5261,7 +5261,7 @@ int DLevelScript::SwapActorTeleFog(AActor *activator, int tid)
if (rettype == TypeSInt32 || rettype == TypeBool || rettype == TypeColor || rettype == TypeName || rettype == TypeSound)
{
VMReturn ret(&retval);
VMCall(func, &params[0], params.Size(), &ret, 1);
VMCallWithDefaults(func, params, &ret, 1);
if (rettype == TypeName)
{
retval = GlobalACSStrings.AddString(FName(ENamedName(retval)).GetChars());