diff options
author | linencloth <none@none> | 2010-10-25 02:30:50 +0200 |
---|---|---|
committer | linencloth <none@none> | 2010-10-25 02:30:50 +0200 |
commit | 3742e8ddec39e82ee5ce2d596433077beae7902d (patch) | |
tree | 111b10f39ae9a666e896f13b0b3c9311dc00b73e /src/server/game/Maps/Map.cpp | |
parent | 910264070c9105519a2057fff0b8c72f6c1b01c7 (diff) |
Core/Transport: Prevent creature passengers from teleporting to an invalid grid.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rwxr-xr-x | src/server/game/Maps/Map.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index ff826e32887..ed77fee63dc 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -779,7 +779,7 @@ Map::PlayerRelocation(Player *player, float x, float y, float z, float orientati } void -Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang) +Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang, bool respawnRelocationOnFail) { ASSERT(CheckGridIntegrity(creature,false)); @@ -788,6 +788,9 @@ Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang CellPair new_val = Trinity::ComputeCellPair(x, y); Cell new_cell(new_val); + if (!respawnRelocationOnFail && !getNGrid(new_cell.GridX(), new_cell.GridY())) + return; + // delay creature move for grid/cell to grid/cell moves if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell)) { |