diff options
author | megamage <none@none> | 2008-12-14 13:17:34 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-14 13:17:34 -0600 |
commit | f3451681066aad73e0f26c0dae9ae3cce90ac9c4 (patch) | |
tree | 6de819fba9abef6cf6c03f6b5ade9ea4022c2e3e /src/game/Map.cpp | |
parent | 7097ffe6dc326362a4d51b4c4453d6ca7ba928c8 (diff) |
*Try to fix a bug that chain-cast far sight may cause crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r-- | src/game/Map.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index f3c4adbd805..81dac274b1c 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -443,6 +443,10 @@ Map::LoadGrid(const Cell& cell, bool no_unload) ObjectAccessor::Instance().AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this); setGridObjectDataLoaded(true,cell.GridX(), cell.GridY()); + // Not sure if this is the reason that far sight cause crash + // Seems crash happens when trying to delete a far sight dynobj from an unopened grid + ResetGridExpiry(*getNGrid(cell.GridX(), cell.GridY()), 1.0f); + grid->SetGridState(GRID_STATE_ACTIVE); if(no_unload) getNGrid(cell.GridX(), cell.GridY())->setUnloadFlag(false); } |