mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Small progress with vehicles
This commit is contained in:
parent
204b61c220
commit
871d5f8c99
18 changed files with 175 additions and 21 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue