summaryrefslogtreecommitdiff
path: root/src/net/manaserv/itemhandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-05-02 22:10:21 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-05-02 22:15:34 +0200
commit7fa9db23c67c690f8d96d5bd1ea2d0c39f52a0ac (patch)
tree21abec05df74cce2357eab7f3c773740b33f6592 /src/net/manaserv/itemhandler.cpp
parenta6b11834f227b8edbfb39633380806480fd2a2c5 (diff)
downloadmana-7fa9db23c67c690f8d96d5bd1ea2d0c39f52a0ac.tar.gz
mana-7fa9db23c67c690f8d96d5bd1ea2d0c39f52a0ac.tar.bz2
mana-7fa9db23c67c690f8d96d5bd1ea2d0c39f52a0ac.tar.xz
mana-7fa9db23c67c690f8d96d5bd1ea2d0c39f52a0ac.zip
Fixed network layer doing delayed actor deletion
The delayed actor deletion was meant to be used during the logic calls, to avoid modifying the container while it is being iterated. The deletions happening from the network layer are not done while iterating the set of actors, so it can delete immediately. This fixes an issue where an NPC would disappear when changing appearance on tmwAthena, because this was implemented as a remove + add, which broke due to the delayed deletion. Mantis-issue: 507 Reviewed-by: Jared Adams
Diffstat (limited to 'src/net/manaserv/itemhandler.cpp')
-rw-r--r--src/net/manaserv/itemhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/manaserv/itemhandler.cpp b/src/net/manaserv/itemhandler.cpp
index 4e29bb4f..de5b36fa 100644
--- a/src/net/manaserv/itemhandler.cpp
+++ b/src/net/manaserv/itemhandler.cpp
@@ -60,7 +60,7 @@ void ItemHandler::handleMessage(MessageIn &msg)
}
else if (FloorItem *item = actorSpriteManager->findItem(id))
{
- actorSpriteManager->destroy(item);
+ actorSpriteManager->destroyActor(item);
}
}
} break;