1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

ServerEnv: Clean up object lifecycle handling (#6414)

* ServerEnv: Clean up object lifecycle handling
This commit is contained in:
sfan5
2017-09-15 12:19:01 +02:00
committed by Loïc Blot
parent edbc533414
commit 04839f233f
8 changed files with 175 additions and 213 deletions

View File

@@ -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 "