Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 17, 2012, 6:38:14 PM (12 years ago)
Author:
landauf
Message:

added warning if a template is used on a different type than it was defined for. this doesn't matter technically, but it's misleading.
fixed template type of ShrinkPickups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/libraries/core/Template.cc

    r8858 r9303  
    149149        orxout(verbose, context::templates) << object->getLoaderIndentation() << " aplying Template \"" << this->getName() << "\"..." << endl;
    150150
     151        // check if the template is applied on an object of the right type
     152        Identifier* identifier = Identifier::getIdentifierByString(this->getXMLElement().Value());
     153        if (!object->getIdentifier()->isA(identifier))
     154            orxout(internal_warning, context::templates) << "Template was defined for " << identifier->getName() << " but the object is of type " << object->getIdentifier()->getName() << endl;
     155
    151156        Element temp = &const_cast<TiXmlElement&>(this->getXMLElement());
    152157
Note: See TracChangeset for help on using the changeset viewer.