mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
This commit is contained in:
parent
edbc533414
commit
04839f233f
8 changed files with 175 additions and 213 deletions
|
@ -1124,8 +1124,8 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
|
|||
playersao->noCheatDigStart(p_under);
|
||||
}
|
||||
else if (pointed.type == POINTEDTHING_OBJECT) {
|
||||
// Skip if object has been removed
|
||||
if (pointed_object->m_removed)
|
||||
// Skip if object can't be interacted with anymore
|
||||
if (pointed_object->isGone())
|
||||
return;
|
||||
|
||||
actionstream<<player->getName()<<" punches object "
|
||||
|
@ -1283,8 +1283,8 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
|
|||
if (pointed.type == POINTEDTHING_OBJECT) {
|
||||
// Right click object
|
||||
|
||||
// Skip if object has been removed
|
||||
if (pointed_object->m_removed)
|
||||
// Skip if object can't be interacted with anymore
|
||||
if (pointed_object->isGone())
|
||||
return;
|
||||
|
||||
actionstream << player->getName() << " right-clicks object "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue