Core: Random cleanup + compile fix

This commit is contained in:
Shauren
2012-02-23 13:01:16 +01:00
parent dbd8cbcfc4
commit dc28b92415
20 changed files with 114 additions and 113 deletions

View File

@@ -62,27 +62,19 @@ void SmartWaypointMgr::LoadFromDB()
y = fields[3].GetFloat();
z = fields[4].GetFloat();
WayPoint* wp = new WayPoint(id, x, y, z);
if (last_entry != entry)
{
path = new WPPath;
waypoint_map[entry] = new WPPath();
last_id = 1;
count++;
}
if (last_id != id)
{
sLog->outErrorDb("SmartWaypointMgr::LoadFromDB: Path entry %u, unexpected point id %u, expected %u.", entry, id, last_id);
}
last_id++;
(*path)[id] = wp;
(*waypoint_map[entry])[id] = new WayPoint(id, x, y, z);
if (last_entry != entry)
{
count++;
waypoint_map[entry] = path;
}
last_entry = entry;
total++;
}