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

Location:
code/branches/presentation2012merge
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/data/levels/templates/pickupRepresentationTemplates.oxt

    r9269 r9303  
    491491
    492492<Template name=smallshrinkpickup>
    493   <InvisiblePickup
     493  <ShrinkPickup
    494494    duration = 10.0
    495495    shrinkFactor = 2.5
     
    516516
    517517<Template name=mediumshrinkpickup>
    518   <InvisiblePickup
     518  <ShrinkPickup
    519519    duration = 30.0
    520520    shrinkFactor = 5.0
     
    541541
    542542<Template name=hugeshrinkpickup>
    543   <InvisiblePickup
     543  <ShrinkPickup
    544544    duration = 60.0
    545545    shrinkFactor = 10.0
  • 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.