more granular debug messages for appearances so we can know for sure which caller it is missing them

This commit is contained in:
DarthArgus
2016-01-10 20:39:30 -06:00
parent 45c48efbfc
commit f952820391
9 changed files with 32 additions and 5 deletions
@@ -839,7 +839,10 @@ void GameServer::loadTerrain ()
Appearance * const appearance = AppearanceTemplateList::createAppearance(terrainFileName);
if (appearance != NULL) {
terrainObject->setAppearance(appearance);
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template for GameServer::loadTerrain missing for %s.", terrainFileName));
}
ProceduralTerrainAppearance * const proceduralTerrainAppearance = dynamic_cast<ProceduralTerrainAppearance *>(appearance);
if (proceduralTerrainAppearance) {
@@ -42,6 +42,8 @@ StaticObject::StaticObject(const ServerStaticObjectTemplate* newTemplate) :
if(newAppearance != NULL)
{
setAppearance(newAppearance);
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template for StaticObject::StaticObject missing for %s.", newTemplate->DataResource::getName()));
}
}
}
@@ -472,6 +472,8 @@ TangibleObject::TangibleObject(const ServerTangibleObjectTemplate* newTemplate)
if(newAppearance != NULL)
{
setAppearance(newAppearance);
} else {
DEBUG_WARNING(true, ("Missing appearance for TangibleObject::TangibleObject %s", appearanceString.c_str()));
}
}
}
@@ -212,6 +212,8 @@ void DoorObject::createAppearance ( DoorInfo const & info )
if (appearance != NULL) {
setAppearance(appearance);
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template for DoorObject::createAppearance missing, first stanza."));
}
}
@@ -237,6 +239,8 @@ void DoorObject::createAppearance ( DoorInfo const & info )
Extent * appearanceExtent = new Extent( Containment3d::EncloseSphere(verts) );
appearanceExtent->incrementReference();
appearance->setExtent( appearanceExtent );
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template for DoorObject::createAppearance missing, second stanza."));
}
}
else
@@ -247,6 +251,8 @@ void DoorObject::createAppearance ( DoorInfo const & info )
if (appearance != NULL) {
m_drawnDoor[0]->setAppearance(appearance);
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template for DoorObject::createAppearance missing, third stanza."));
}
}
@@ -259,6 +265,8 @@ void DoorObject::createAppearance ( DoorInfo const & info )
if (appearance != NULL) {
m_drawnDoor[1]->setAppearance(appearance);
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template for DoorObject::createAppearance missing, fourth stanza."));
}
if (info.m_doorFlip2)
@@ -399,10 +399,10 @@ Appearance *AppearanceTemplateList::createAppearance(const char *const fileName)
//-- get the appearance template
const AppearanceTemplate *const appearanceTemplate = fetch(fileName);
#ifdef _DEBUG
#ifdef _DEBUG //probably should modify the macro sometime to just be quiet if this isn't defined
if (appearanceTemplate == NULL){
DEBUG_WARNING(true, ("FIX ME: Appearance template for %s could not be fetched - is it missing?", fileName));
return NULL; // Cekis: TODO: Figure out why the template can't be fetched.
DEBUG_WARNING(true, ("FIX ME: Appearance template for %s could not be fetched - is it missing?", fileName));
return NULL; // Cekis: TODO: Figure out why the template can't be fetched. DarthArgus: always is due to a missing file or one of the redirectors having a bad path
}
DataLint::pushAsset(fileName);
@@ -2464,7 +2464,9 @@ void Object::setAppearanceByName(char const *path)
if (appearance != NULL)
{
setAppearance(appearance);
}
} else {
DEBUG_WARNING(true, ("Object::setAppearanceByName() - Unable to find the object's appearance because the file does not exist: %s", path));
}
}
else
{
@@ -3275,6 +3277,7 @@ void Object::setAlternateAppearance(const char * path)
alternateAppearance = AppearanceTemplateList::createAppearance(path);
if (alternateAppearance == NULL) {
DEBUG_WARNING(true, ("Object::setAlternateAppearance() - Unable to change the object's appearance because the file does not exist: %s", path));
return;
}
}
@@ -438,6 +438,8 @@ void CellProperty::initialize(const PortalProperty &portalProperty, int cellInde
if (ms_addToRenderWorldHook)
ms_addToRenderWorldHook(*m_appearanceObject);
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template in CellProperty::initialize missing"));
}
}
@@ -463,6 +463,8 @@ void PortalProperty::createAppearance()
if (appearance != NULL) {
appearance->setShadowBlobAllowed();
getOwner().setAppearance(appearance);
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template for PortalProperty::createAppearance missing"));
}
}
@@ -1200,6 +1200,8 @@ void ProceduralTerrainAppearance::_legacyCreateFlora(const Chunk* const chunk)
object->addToWorld ();
IGNORE_RETURN (m_floraMap->insert (std::make_pair (key, object)));
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template in ProceduralTerrainAppearance::_legacyCreateFlora is not found"));
}
} //lint !e429 //-- collisionProperty has not been freed or returned
}
@@ -1357,7 +1359,10 @@ void ProceduralTerrainAppearance::createFlora (const Chunk* const chunk)
object->addToWorld ();
IGNORE_RETURN (m_floraMap->insert (std::make_pair (key, object)));
}
} else {
DEBUG_WARNING(true, ("FIX ME: Appearance template in ProceduralTerrainAppearance::createFlora is not found"));
}
} //lint !e429 //-- collisionProperty has not been freed or returned
}