Small progress with vehicles

This commit is contained in:
tomrus88 2008-11-12 00:49:19 +03:00
parent 204b61c220
commit 871d5f8c99
18 changed files with 175 additions and 21 deletions

View file

@ -253,7 +253,7 @@ template<>
void Map::AddToGrid(Creature* obj, NGridType *grid, Cell const& cell)
{
// add to world object registry in grid
if(obj->isPet())
if(obj->isPet() || obj->isVehicle())
{
(*grid)(cell.CellX(), cell.CellY()).AddWorldObject<Creature>(obj, obj->GetGUID());
obj->SetCurrentCell(cell);
@ -297,7 +297,7 @@ template<>
void Map::RemoveFromGrid(Creature* obj, NGridType *grid, Cell const& cell)
{
// remove from world object registry in grid
if(obj->isPet())
if(obj->isPet() || obj->isVehicle())
{
(*grid)(cell.CellX(), cell.CellY()).RemoveWorldObject<Creature>(obj, obj->GetGUID());
}