mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +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
|
void
|
||||||
Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
|
||||||
{
|
{
|
||||||
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
|
NGridType *grid;
|
||||||
|
|
||||||
if(EnsureGridLoaded(cell))
|
if(EnsureGridLoaded(cell))
|
||||||
{
|
{
|
||||||
|
grid = getNGrid(cell.GridX(), cell.GridY());
|
||||||
|
|
||||||
if (player)
|
if (player)
|
||||||
{
|
{
|
||||||
player->SendDelayResponse(MAX_GRID_LOAD_TIME);
|
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);
|
ResetGridExpiry(*getNGrid(cell.GridX(), cell.GridY()), 0.1f);
|
||||||
grid->SetGridState(GRID_STATE_ACTIVE);
|
grid->SetGridState(GRID_STATE_ACTIVE);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
grid = getNGrid(cell.GridX(), cell.GridY());
|
||||||
|
|
||||||
if (player)
|
if (player)
|
||||||
AddToGrid(player,grid,cell);
|
AddToGrid(player,grid,cell);
|
||||||
|
|
|
||||||
|
|
@ -425,7 +425,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
||||||
CreatureMoveList i_creaturesToMove;
|
CreatureMoveList i_creaturesToMove;
|
||||||
|
|
||||||
bool loaded(const GridPair &) const;
|
bool loaded(const GridPair &) const;
|
||||||
void EnsureGridCreated(const GridPair &);
|
void EnsureGridCreated(const GridPair &);
|
||||||
bool EnsureGridLoaded(Cell const&);
|
bool EnsureGridLoaded(Cell const&);
|
||||||
void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
|
void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7593"
|
#define REVISION_NR "7594"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue