Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8439 in orxonox.OLD for branches/bsp_model/src/world_entities


Ignore:
Timestamp:
Jun 15, 2006, 1:50:54 AM (18 years ago)
Author:
patrick
Message:

bsp: md3 model data read in as it seams correctly. no drawing yet! interactive model introduced

Location:
branches/bsp_model/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/world_entities/creatures/md2_creature.cc

    r8346 r8439  
    256256  if( this->bJump && likely(this->getModel(0) != NULL))
    257257  {
    258     ((MD2Model*)this->getModel(0))->setAnim(JUMP);
     258    ((MD2Model*)this->getModel(0))->setAnimation(JUMP);
    259259  }
    260260  else if( this->bFire && likely(this->getModel(0) != NULL))
    261261  {
    262     if( ((MD2Model*)this->getModel(0))->getAnim() != ATTACK) ((MD2Model*)this->getModel(0))->setAnim(ATTACK);
     262    if( ((MD2Model*)this->getModel(0))->getAnim() != ATTACK) ((MD2Model*)this->getModel(0))->setAnimation(ATTACK);
    263263  }
    264264  else if( fabs(move.len()) > 0.0f && likely(this->getModel(0) != NULL))
    265265  {
    266     if( ((MD2Model*)this->getModel(0))->getAnim() != RUN) ((MD2Model*)this->getModel(0))->setAnim(RUN);
     266    if( ((MD2Model*)this->getModel(0))->getAnim() != RUN) ((MD2Model*)this->getModel(0))->setAnimation(RUN);
    267267  }
    268268  else if (likely(this->getModel(0) != NULL))
    269269  {
    270     if( ((MD2Model*)this->getModel(0))->getAnim() != STAND) ((MD2Model*)this->getModel(0))->setAnim(STAND);
     270    if( ((MD2Model*)this->getModel(0))->getAnim() != STAND) ((MD2Model*)this->getModel(0))->setAnimation(STAND);
    271271  }
    272272
  • branches/bsp_model/src/world_entities/test_entity.cc

    r8346 r8439  
    2626
    2727#include "test_entity.h"
    28 #include "stdincl.h"
    29 #include "model.h"
     28
     29
     30#include "interactive_model.h"
    3031#include "md2/md2Model.h"
    31 #include "obb_tree.h"
     32
    3233#include "state.h"
    3334
     
    9091{
    9192  if( likely(this->getModel(0) != NULL))
    92     ((MD2Model*)this->getModel(0))->setAnim(animationIndex, animPlaybackMode);
     93    ((InteractiveModel*)this->getModel(0))->setAnimation(animationIndex, animPlaybackMode);
    9394}
    9495
     
    9798{
    9899  if( likely(this->getModel(0) != NULL))
    99     ((MD2Model*)this->getModel(0))->tick(time);
     100    ((InteractiveModel*)this->getModel(0))->tick(time);
    100101
    101102}
     
    122123
    123124  this->bDeath = true;
    124   float anim;
    125125  int randi = (int)(5.0f * (float)rand()/(float)RAND_MAX);
    126126
Note: See TracChangeset for help on using the changeset viewer.