diff --git a/src/compatibility.cpp b/src/compatibility.cpp index f47ea9a96..cf2aa78ab 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -87,6 +87,7 @@ enum CP_SETTAG, CP_SETTHINGFLAGS, CP_SETVERTEX, + CP_SETTHINGSKILLS, }; // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- @@ -358,6 +359,15 @@ void ParseCompatibility() CompatParams.Push(int(sc.Float * 256)); // do not use full fixed here so that it can eventually handle larger levels flags.CompatFlags[SLOT_BCOMPAT] |= BCOMPATF_REBUILDNODES; } + else if (sc.Compare("setthingskills")) + { + if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); + CompatParams.Push(CP_SETTHINGSKILLS); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + } else { sc.UnGet(); @@ -623,6 +633,15 @@ void SetCompatibilityParams() i += 4; break; } + case CP_SETTHINGSKILLS: + { + if ((unsigned)CompatParams[i + 1] < MapThingsConverted.Size()) + { + MapThingsConverted[CompatParams[i + 1]].SkillFilter = CompatParams[i + 2]; + } + i += 3; + break; + } } } }