mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
Added compatibility parameter to set thing skills
# Conflicts: # src/compatibility.cpp
This commit is contained in:
parent
9011f0ed5b
commit
cd8aa252ae
1 changed files with 19 additions and 0 deletions
|
@ -87,6 +87,7 @@ enum
|
||||||
CP_SETTAG,
|
CP_SETTAG,
|
||||||
CP_SETTHINGFLAGS,
|
CP_SETTHINGFLAGS,
|
||||||
CP_SETVERTEX,
|
CP_SETVERTEX,
|
||||||
|
CP_SETTHINGSKILLS,
|
||||||
};
|
};
|
||||||
|
|
||||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
// 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
|
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;
|
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
|
else
|
||||||
{
|
{
|
||||||
sc.UnGet();
|
sc.UnGet();
|
||||||
|
@ -623,6 +633,15 @@ void SetCompatibilityParams()
|
||||||
i += 4;
|
i += 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CP_SETTHINGSKILLS:
|
||||||
|
{
|
||||||
|
if ((unsigned)CompatParams[i + 1] < MapThingsConverted.Size())
|
||||||
|
{
|
||||||
|
MapThingsConverted[CompatParams[i + 1]].SkillFilter = CompatParams[i + 2];
|
||||||
|
}
|
||||||
|
i += 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue