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 drfrag
parent a7fb96eec5
commit da90f839cf

View file

@ -5381,7 +5381,7 @@ static int ScriptCall(AActor *activator, unsigned argc, int32_t *args)
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)));