Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2006, 2:08:01 PM (18 years ago)
Author:
nicolasc
Message:

updated animation, needs rebuild as weapon.h has been changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/weapons/weapon.cc

    r10121 r10136  
    308308    {
    309309      PRINTF(2)("Node not defined for the Creation of the 3D-animation of state %s\n", stateToChar(state));
     310      return NULL;
     311    }
     312  }
     313  else
     314    return this->animation[state];
     315}
     316
     317Animation3D* Weapon::getAnimation(ShootingStates state, PNode* node)
     318{
     319  if (state >= WS_SS_MAX) // if the state is not known
     320    return NULL;
     321
     322  if (unlikely(this->animation[state] == NULL)) // if the animation does not exist yet create it.
     323  {
     324    if (likely(node != NULL))
     325      return this->animation[state] = new Animation3D(node);
     326    else
     327    {
     328//       PRINTF(2)("Node not defined for the Creation of the 3D-animation of state %s\n", stateToChar(state));
    310329      return NULL;
    311330    }
Note: See TracChangeset for help on using the changeset viewer.