mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
ObjectRef:set_armor_groups() and ObjectRef:set_properties() - works on players too!
This commit is contained in:
parent
9e7ccedba4
commit
3241ad3ae8
6 changed files with 154 additions and 64 deletions
|
@ -643,6 +643,16 @@ void LuaEntitySAO::setArmorGroups(const ItemGroupList &armor_groups)
|
|||
m_armor_groups_sent = false;
|
||||
}
|
||||
|
||||
ObjectProperties* LuaEntitySAO::accessObjectProperties()
|
||||
{
|
||||
return &m_prop;
|
||||
}
|
||||
|
||||
void LuaEntitySAO::notifyObjectPropertiesModified()
|
||||
{
|
||||
m_properties_sent = false;
|
||||
}
|
||||
|
||||
void LuaEntitySAO::setVelocity(v3f velocity)
|
||||
{
|
||||
m_velocity = velocity;
|
||||
|
@ -1038,6 +1048,16 @@ void PlayerSAO::setArmorGroups(const ItemGroupList &armor_groups)
|
|||
m_armor_groups_sent = false;
|
||||
}
|
||||
|
||||
ObjectProperties* PlayerSAO::accessObjectProperties()
|
||||
{
|
||||
return &m_prop;
|
||||
}
|
||||
|
||||
void PlayerSAO::notifyObjectPropertiesModified()
|
||||
{
|
||||
m_properties_sent = false;
|
||||
}
|
||||
|
||||
Inventory* PlayerSAO::getInventory()
|
||||
{
|
||||
return m_inventory;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue