- call level compatibility handlers for all levels and pass the map name as a second parameter.
This is for user-made handlers for which the checksum is rather useless both for deciding whether to call the handler and for identifying the map.
This commit is contained in:
parent
68f0cf111d
commit
b2ee99c7cc
2 changed files with 13 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue