Do not add a corpse to grid twice. Should fix #3918.
This commit is contained in:
@@ -250,6 +250,13 @@ void ObjectAccessor::AddCorpsesToGrid(GridCoord const& gridpair, GridType& grid,
|
|||||||
|
|
||||||
for (Player2CorpsesMapType::iterator iter = i_player2corpse.begin(); iter != i_player2corpse.end(); ++iter)
|
for (Player2CorpsesMapType::iterator iter = i_player2corpse.begin(); iter != i_player2corpse.end(); ++iter)
|
||||||
{
|
{
|
||||||
|
if (iter->second->IsInGrid())
|
||||||
|
{
|
||||||
|
//TODO: add this assert later
|
||||||
|
//ASSERT(iter->second->GetGridCoord() == gridpair);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (iter->second->GetGridCoord() == gridpair)
|
if (iter->second->GetGridCoord() == gridpair)
|
||||||
{
|
{
|
||||||
// verify, if the corpse in our instance (add only corpses which are)
|
// verify, if the corpse in our instance (add only corpses which are)
|
||||||
|
|||||||
Reference in New Issue
Block a user