mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Merge branch 'levelledcreatures' into 'master'
Some checks failed
Build and test / MacOS (push) Has been cancelled
Build and test / Ubuntu (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Some checks failed
Build and test / MacOS (push) Has been cancelled
Build and test / Ubuntu (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Avoid reference to temporary in levelled creatures bindings (#8347) Closes #8347 See merge request OpenMW/openmw!4535
This commit is contained in:
commit
63e3b8f41b
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ namespace MWLua
|
|||
[](const ESM::CreatureLevList& rec) -> std::string { return rec.mId.serializeText(); });
|
||||
record["chanceNone"] = sol::readonly_property(
|
||||
[](const ESM::CreatureLevList& rec) -> float { return std::clamp(rec.mChanceNone / 100.f, 0.f, 1.f); });
|
||||
record["creatures"] = sol::readonly_property([&](const ESM::CreatureLevList& rec) -> sol::table {
|
||||
record["creatures"] = sol::readonly_property([state](const ESM::CreatureLevList& rec) -> sol::table {
|
||||
sol::table res(state, sol::create);
|
||||
for (size_t i = 0; i < rec.mList.size(); ++i)
|
||||
res[LuaUtil::toLuaIndex(i)] = rec.mList[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue