chest trap write lock when shuffling the map
This commit is contained in:
parent
55bb3d752c
commit
1db0dba76c
1 changed files with 3 additions and 0 deletions
|
@ -66,7 +66,10 @@ bool ChestTrapList::GetNextChestTrap(ChestTrap::ChestTrapInfo* cti) {
|
|||
{
|
||||
MChestTrapList.releasereadlock(__FUNCTION__, __LINE__);
|
||||
//re-shuffle the map, we reached the end
|
||||
|
||||
MChestTrapList.writelock(__FUNCTION__, __LINE__);
|
||||
shuffleMap(this);
|
||||
MChestTrapList.releasewritelock(__FUNCTION__, __LINE__);
|
||||
}
|
||||
else
|
||||
MChestTrapList.releasereadlock(__FUNCTION__, __LINE__);
|
||||
|
|
Loading…
Reference in a new issue