mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-26 07:53:58 +00:00
Fix *_setRenderPass() regression from 7ff0caaed8
. Remove obj_setRealRenderPass() again.
This corrects render pass overriding, especially Li's arm, which was supposed to be in front of the hug; and being eaten by a grouper, where Naija stayed visible because the grouper skeletal's render pass was not set correctly.
This commit is contained in:
parent
8712657e75
commit
cbd3658b27
1 changed files with 14 additions and 12 deletions
|
@ -1262,15 +1262,6 @@ luaFunc(obj_setLayer)
|
||||||
}
|
}
|
||||||
|
|
||||||
luaFunc(obj_setRenderPass)
|
luaFunc(obj_setRenderPass)
|
||||||
{
|
|
||||||
RenderObject *r = robj(L);
|
|
||||||
int pass = lua_tointeger(L, 2);
|
|
||||||
if (r)
|
|
||||||
r->setOverrideRenderPass(pass);
|
|
||||||
luaReturnNil();
|
|
||||||
}
|
|
||||||
|
|
||||||
luaFunc(obj_setRealRenderPass)
|
|
||||||
{
|
{
|
||||||
RenderObject *r = robj(L);
|
RenderObject *r = robj(L);
|
||||||
int pass = lua_tointeger(L, 2);
|
int pass = lua_tointeger(L, 2);
|
||||||
|
@ -1561,7 +1552,6 @@ luaFunc(quad_setSegs)
|
||||||
RO_FUNC(getter, prefix, setCullRadius ) \
|
RO_FUNC(getter, prefix, setCullRadius ) \
|
||||||
RO_FUNC(getter, prefix, setUpdateCull ) \
|
RO_FUNC(getter, prefix, setUpdateCull ) \
|
||||||
RO_FUNC(getter, prefix, setRenderPass ) \
|
RO_FUNC(getter, prefix, setRenderPass ) \
|
||||||
RO_FUNC(getter, prefix, setRealRenderPass ) \
|
|
||||||
RO_FUNC(getter, prefix, setPositionX ) \
|
RO_FUNC(getter, prefix, setPositionX ) \
|
||||||
RO_FUNC(getter, prefix, setPositionY ) \
|
RO_FUNC(getter, prefix, setPositionY ) \
|
||||||
RO_FUNC(getter, prefix, enableMotionBlur ) \
|
RO_FUNC(getter, prefix, enableMotionBlur ) \
|
||||||
|
@ -3633,13 +3623,24 @@ luaFunc(entity_setEntityLayer)
|
||||||
luaReturnNil();
|
luaReturnNil();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note that this overrides the generic obj_setRenderPass function for entities.
|
||||||
|
// (It's registered as "entity_setRenderPass" to Lua)
|
||||||
|
luaFunc(entity_setRenderPass_override)
|
||||||
|
{
|
||||||
|
Entity *e = entity(L);
|
||||||
|
int pass = lua_tointeger(L, 2);
|
||||||
|
if (e)
|
||||||
|
e->setOverrideRenderPass(pass);
|
||||||
|
luaReturnNil();
|
||||||
|
}
|
||||||
|
|
||||||
// intended to be used for setting max health and refilling it all
|
// intended to be used for setting max health and refilling it all
|
||||||
luaFunc(entity_setHealth)
|
luaFunc(entity_setHealth)
|
||||||
{
|
{
|
||||||
Entity *e = entity(L, 1);
|
Entity *e = entity(L, 1);
|
||||||
if (e)
|
if (e)
|
||||||
e->health = e->maxHealth = lua_tonumber(L, 2);
|
e->health = e->maxHealth = lua_tonumber(L, 2);
|
||||||
luaReturnNum(0);
|
luaReturnNil();
|
||||||
}
|
}
|
||||||
|
|
||||||
luaFunc(entity_changeHealth)
|
luaFunc(entity_changeHealth)
|
||||||
|
@ -3647,7 +3648,7 @@ luaFunc(entity_changeHealth)
|
||||||
Entity *e = entity(L, 1);
|
Entity *e = entity(L, 1);
|
||||||
if (e)
|
if (e)
|
||||||
e->health += lua_tonumber(L, 2);
|
e->health += lua_tonumber(L, 2);
|
||||||
luaReturnNum(0);
|
luaReturnNil();
|
||||||
}
|
}
|
||||||
|
|
||||||
luaFunc(entity_heal)
|
luaFunc(entity_heal)
|
||||||
|
@ -8103,6 +8104,7 @@ static const struct {
|
||||||
|
|
||||||
{"bone_getPosition", l_bone_getWorldPosition},
|
{"bone_getPosition", l_bone_getWorldPosition},
|
||||||
{ "entity_delete", l_entity_delete_override },
|
{ "entity_delete", l_entity_delete_override },
|
||||||
|
{ "entity_setRenderPass", l_entity_setRenderPass_override },
|
||||||
|
|
||||||
// -- deprecated/compatibility related functions below here --
|
// -- deprecated/compatibility related functions below here --
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue