Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2005, 11:52:49 AM (18 years ago)
Author:
patrick
Message:

christmas: the animation is now also loadable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/christmas_branche/src/world_entities/test_entity.cc

    r6207 r6217  
    2020#include "executor/executor.h"
    2121#include "factory.h"
     22#include "load_param.h"
    2223
    2324#include "test_entity.h"
     
    6970{
    7071  static_cast<WorldEntity*>(this)->loadParams(root);
     72
     73  LoadParam(root, "md2animation", this, TestEntity, setAnim)
     74      .describe("sets the animation of the md2 model")
     75      .defaultValues(1, 1);
     76
    7177}
    7278
    7379
    7480void  TestEntity::setAnim(int animationIndex)
    75 {}
     81{
     82  if( likely(this->getModel(0) != NULL))
     83    ((MD2Model*)this->getModel(0))->setAnim(animationIndex);
     84}
    7685
    7786
Note: See TracChangeset for help on using the changeset viewer.