Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7221 in orxonox.OLD for trunk/src/world_entities/creatures


Ignore:
Timestamp:
Mar 15, 2006, 3:10:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

Location:
trunk/src/world_entities/creatures
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/creatures/md2_creature.cc

    r7193 r7221  
    5252 * @param fileName the name of the File to load the MD2Creature from (absolute path)
    5353 */
    54 MD2Creature::MD2Creature(const char* fileName)
     54MD2Creature::MD2Creature(const std::string& fileName)
    5555{
    5656  this->init();
     
    5959  if(!doc.LoadFile())
    6060  {
    61     PRINTF(2)("Loading file %s failed for md2 creature.\n", fileName);
     61    PRINTF(2)("Loading file %s failed for md2 creature.\n", fileName.c_str());
    6262    return;
    6363  }
     
    255255  this->shiftCoor (move);
    256256
    257   if( this->bJump)
     257  if( this->bJump && likely(this->getModel(0) != NULL))
    258258  {
    259259    ((MD2Model*)this->getModel(0))->setAnim(JUMP);
    260260  }
    261   else if( this->bFire)
     261  else if( this->bFire && likely(this->getModel(0) != NULL))
    262262  {
    263263    if( ((MD2Model*)this->getModel(0))->getAnim() != ATTACK) ((MD2Model*)this->getModel(0))->setAnim(ATTACK);
    264264  }
    265   else if( fabs(move.len()) > 0.0f)
     265  else if( fabs(move.len()) > 0.0f && likely(this->getModel(0) != NULL))
    266266  {
    267267    if( ((MD2Model*)this->getModel(0))->getAnim() != RUN) ((MD2Model*)this->getModel(0))->setAnim(RUN);
    268268  }
    269   else
     269  else if (likely(this->getModel(0) != NULL))
    270270  {
    271271    if( ((MD2Model*)this->getModel(0))->getAnim() != STAND) ((MD2Model*)this->getModel(0))->setAnim(STAND);
  • trunk/src/world_entities/creatures/md2_creature.h

    r7092 r7221  
    1919  public:
    2020
    21     MD2Creature(const char* fileName);
     21    MD2Creature(const std::string& fileName);
    2222    MD2Creature(const TiXmlElement* root = NULL);
    2323    virtual ~MD2Creature();
Note: See TracChangeset for help on using the changeset viewer.