mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-17 02:15:22 +02:00
Send Inventory packet on event, don't check it at each AsyncRunStep.
* Call UpdateCrafting into SendInventory because this functions is only called before SendInventory * Use Player* instead of peer_id for UpdateCrafting because SendInventory already has the Player* pointer, then don't loop for searching Player* per peer_id * m_env_mutex don't need to be used with this modification because it's already locked before the calls
This commit is contained in:
@@ -717,7 +717,6 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_,
|
||||
m_attachment_sent(false),
|
||||
// public
|
||||
m_moved(false),
|
||||
m_inventory_not_sent(false),
|
||||
m_physics_override_speed(1),
|
||||
m_physics_override_jump(1),
|
||||
m_physics_override_gravity(1),
|
||||
@@ -1162,11 +1161,6 @@ InventoryLocation PlayerSAO::getInventoryLocation() const
|
||||
return loc;
|
||||
}
|
||||
|
||||
void PlayerSAO::setInventoryModified()
|
||||
{
|
||||
m_inventory_not_sent = true;
|
||||
}
|
||||
|
||||
std::string PlayerSAO::getWieldList() const
|
||||
{
|
||||
return "main";
|
||||
|
Reference in New Issue
Block a user