mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-26 06:35:51 +00:00
Add riding related Lua functions:
- entity_getRidingPosition() - entity_getRidingRotation() - entity_getRidingFlip()
This commit is contained in:
parent
36c409e1d4
commit
84f1b12c67
1 changed files with 25 additions and 0 deletions
|
@ -2435,6 +2435,28 @@ luaFunc(entity_setRidingData)
|
||||||
luaReturnNil();
|
luaReturnNil();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
luaFunc(entity_getRidingPosition)
|
||||||
|
{
|
||||||
|
Entity *e = entity(L);
|
||||||
|
Vector v;
|
||||||
|
if (e)
|
||||||
|
v = e->getRidingPosition();
|
||||||
|
luaReturnVec2(v.x, v.y);
|
||||||
|
}
|
||||||
|
|
||||||
|
luaFunc(entity_getRidingRotation)
|
||||||
|
{
|
||||||
|
Entity *e = entity(L);
|
||||||
|
luaReturnNum(e ? e->getRidingRotation() : 0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
luaFunc(entity_getRidingFlip)
|
||||||
|
{
|
||||||
|
Entity *e = entity(L);
|
||||||
|
luaReturnBool(e && e->getRidingFlip());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
luaFunc(entity_setBoneLock)
|
luaFunc(entity_setBoneLock)
|
||||||
{
|
{
|
||||||
Entity *e = entity(L);
|
Entity *e = entity(L);
|
||||||
|
@ -8561,6 +8583,9 @@ static const struct {
|
||||||
|
|
||||||
luaRegister(entity_setRidingPosition),
|
luaRegister(entity_setRidingPosition),
|
||||||
luaRegister(entity_setRidingData),
|
luaRegister(entity_setRidingData),
|
||||||
|
luaRegister(entity_getRidingPosition),
|
||||||
|
luaRegister(entity_getRidingRotation),
|
||||||
|
luaRegister(entity_getRidingFlip),
|
||||||
luaRegister(entity_setBoneLock),
|
luaRegister(entity_setBoneLock),
|
||||||
luaRegister(entity_setIngredient),
|
luaRegister(entity_setIngredient),
|
||||||
luaRegister(entity_setDeathScene),
|
luaRegister(entity_setDeathScene),
|
||||||
|
|
Loading…
Reference in a new issue