mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
fix gfx.posteffects.set_intensity
This commit is contained in:
parent
e371153288
commit
f171d3e308
1 changed files with 3 additions and 1 deletions
|
|
@ -34,7 +34,9 @@ static int l_get_intensity(lua::State* L) {
|
||||||
static int l_set_intensity(lua::State* L) {
|
static int l_set_intensity(lua::State* L) {
|
||||||
size_t index = static_cast<size_t>(lua::tointeger(L, 1));
|
size_t index = static_cast<size_t>(lua::tointeger(L, 1));
|
||||||
float value = lua::tonumber(L, 2);
|
float value = lua::tonumber(L, 2);
|
||||||
post_processing->getEffect(index)->setIntensity(value);
|
if (auto effect = post_processing->getEffect(index)) {
|
||||||
|
effect->setIntensity(value);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue