mirror of
https://github.com/SWG-Source/src.git
synced 2026-09-29 16:13:07 -04:00
more null checks in places where we're calling createAppearance; some cleanup
This commit is contained in:
@@ -835,12 +835,16 @@ void GameServer::loadTerrain ()
|
||||
|
||||
TerrainObject * const terrainObject = new TerrainObject(ServerWorld::getTerrainObjectNotification());
|
||||
terrainObject->setDebugName("terrain");
|
||||
|
||||
Appearance * const appearance = AppearanceTemplateList::createAppearance(terrainFileName);
|
||||
terrainObject->setAppearance(appearance);
|
||||
if (appearance != NULL) {
|
||||
terrainObject->setAppearance(appearance);
|
||||
}
|
||||
|
||||
ProceduralTerrainAppearance * const proceduralTerrainAppearance = dynamic_cast<ProceduralTerrainAppearance *>(appearance);
|
||||
if (proceduralTerrainAppearance)
|
||||
if (proceduralTerrainAppearance) {
|
||||
ServerObjectTerrainModificationNotification::setTerrainAppearance(proceduralTerrainAppearance);
|
||||
}
|
||||
|
||||
terrainObject->addToWorld();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user