mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 20:29:57 +00:00
Fix errors
This commit is contained in:
parent
8b75932f50
commit
59a25291f8
1 changed files with 3 additions and 3 deletions
|
@ -65,7 +65,7 @@ namespace MWLua
|
||||||
return static_cast<float>(MWBase::Environment::get().getWorld()->getGlobalInt(globalId));
|
return static_cast<float>(MWBase::Environment::get().getWorld()->getGlobalInt(globalId));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
sol::table initMWScriptBindings(const Context& context)
|
sol::table initMWScriptBindings(const Context& context)
|
||||||
{
|
{
|
||||||
|
@ -146,7 +146,7 @@ namespace MWLua
|
||||||
return sol::nullopt;
|
return sol::nullopt;
|
||||||
return getGlobalVariableValue(globalId);
|
return getGlobalVariableValue(globalId);
|
||||||
},
|
},
|
||||||
[](const GlobalStore& store, int index) -> sol::optional<float> {
|
[](const GlobalStore& store, size_t index) -> sol::optional<float> {
|
||||||
if (index < 1 || store.getSize() < index)
|
if (index < 1 || store.getSize() < index)
|
||||||
return sol::nullopt;
|
return sol::nullopt;
|
||||||
auto g = store.at(index - 1);
|
auto g = store.at(index - 1);
|
||||||
|
@ -164,7 +164,7 @@ namespace MWLua
|
||||||
return getGlobalVariableValue(globalId);
|
return getGlobalVariableValue(globalId);
|
||||||
});
|
});
|
||||||
globalStoreT[sol::meta_function::pairs] = [](const GlobalStore& store) {
|
globalStoreT[sol::meta_function::pairs] = [](const GlobalStore& store) {
|
||||||
int index = 0;
|
size_t index = 0;
|
||||||
return sol::as_function(
|
return sol::as_function(
|
||||||
[index, &store](sol::this_state ts) mutable -> sol::optional<std::tuple<std::string, float>> {
|
[index, &store](sol::this_state ts) mutable -> sol::optional<std::tuple<std::string, float>> {
|
||||||
if (index >= store.getSize())
|
if (index >= store.getSize())
|
||||||
|
|
Loading…
Reference in a new issue