mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7594] Lost last moment fixes for prev. commit.
This will fix crashes at teleports.
This commit is contained in:
parent
5dc0a1ed97
commit
89d9e736a3
3 changed files with 7 additions and 3 deletions
|
|
@ -337,10 +337,12 @@ Map::EnsureGridCreated(const GridPair &p)
|
|||
void
|
||||
Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
||||
{
|
||||
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
NGridType *grid;
|
||||
|
||||
if(EnsureGridLoaded(cell))
|
||||
{
|
||||
grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
|
||||
if (player)
|
||||
{
|
||||
player->SendDelayResponse(MAX_GRID_LOAD_TIME);
|
||||
|
|
@ -354,6 +356,8 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
|||
ResetGridExpiry(*getNGrid(cell.GridX(), cell.GridY()), 0.1f);
|
||||
grid->SetGridState(GRID_STATE_ACTIVE);
|
||||
}
|
||||
else
|
||||
grid = getNGrid(cell.GridX(), cell.GridY());
|
||||
|
||||
if (player)
|
||||
AddToGrid(player,grid,cell);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue