Merge branch 'rolling_back' into new_level_refactor

This commit is contained in:
Christoph Oelckers 2019-01-25 00:57:01 +01:00
commit bf3dc2f99b
4 changed files with 98 additions and 98 deletions

View file

@ -353,21 +353,18 @@ IMPLEMENT_CLASS(DLevelCompatibility, true, false);
void MapLoader::SetCompatibilityParams(FName checksum)
{
if (checksum != NAME_None)
auto lc = Create<DLevelCompatibility>();
lc->loader = this;
lc->Level = Level;
for(auto cls : PClass::AllClasses)
{
auto lc = Create<DLevelCompatibility>();
lc->loader = this;
lc->Level = Level;
for(auto cls : PClass::AllClasses)
if (cls->IsDescendantOf(RUNTIME_CLASS(DLevelCompatibility)))
{
if (cls->IsDescendantOf(RUNTIME_CLASS(DLevelCompatibility)))
PFunction *const func = dyn_cast<PFunction>(cls->FindSymbol("Apply", false));
if (func != nullptr)
{
PFunction *const func = dyn_cast<PFunction>(cls->FindSymbol("Apply", false));
if (func != nullptr)
{
VMValue param[] = { lc, (int)checksum };
VMCall(func->Variants[0].Implementation, param, 2, nullptr, 0);
}
VMValue param[] = { lc, checksum.GetIndex(), &Level->MapName };
VMCall(func->Variants[0].Implementation, param, 3, nullptr, 0);
}
}
}