Browse Source

if map is loaded and the grid does not match the value set in the database, we override

Image 4 years ago
parent
commit
2641486750
1 changed files with 5 additions and 0 deletions
  1. 5 0
      EQ2/source/WorldServer/Spawn.cpp

+ 5 - 0
EQ2/source/WorldServer/Spawn.cpp

@@ -2191,6 +2191,11 @@ void Spawn::ProcessMovement(bool isSpawnListLocked){
 	if (forceMapCheck && GetZone() != nullptr && zone->zonemap != nullptr && zone->zonemap->IsMapLoaded())
 	{
 		FixZ(true);
+
+		int32 newGrid = GetZone()->Grid->GetGridID(this);
+		if (!IsFlying() && newGrid != 0 && newGrid != appearance.pos.grid_id)
+			SetPos(&(appearance.pos.grid_id), newGrid);
+
 		forceMapCheck = false;
 	}