mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
Merge branch 'main' into animation
This commit is contained in:
commit
8c1d8bd794
24 changed files with 56 additions and 50 deletions
|
|
@ -51,7 +51,7 @@ static std::unique_ptr<xml::xmlelement> toxml(lua::State* L) {
|
|||
break;
|
||||
}
|
||||
auto key = lua::require_lstring(L, -1);
|
||||
if (key == "@") {
|
||||
if (key == TAG_ATTR) {
|
||||
break;
|
||||
}
|
||||
auto value = lua::require_lstring(L, -2);
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ namespace lua {
|
|||
|
||||
if (found == usertypeNames.end()) {
|
||||
log_error(
|
||||
"usertype is not registred: " + std::string(typeid(T).name())
|
||||
"usertype is not registered: " + std::string(typeid(T).name())
|
||||
);
|
||||
} else if (getglobal(L, found->second)) {
|
||||
setmetatable(L);
|
||||
|
|
|
|||
|
|
@ -128,11 +128,10 @@ static int l_noise(lua::State* L) {
|
|||
}
|
||||
|
||||
float noiseValue = fnlGetNoise2D(noise, u, v);
|
||||
float t = 1.0f / static_cast<float>(1 << c) * multiplier;
|
||||
if (normalizedNoise) {
|
||||
float t = 1.0f / (static_cast<float>(1 << c) * multiplier);
|
||||
value = value * (1.0f - t) + noiseValue * t;
|
||||
} else {
|
||||
float t = 1.0f / static_cast<float>(1 << c) * multiplier;
|
||||
value += noiseValue * t;
|
||||
}
|
||||
heights[i] = value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue