Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4114 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
May 7, 2005, 10:02:57 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: minor cleanup/windowsTest

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

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/player.cc

    r4091 r4114  
    8282Player::Player(TiXmlElement* root) : WorldEntity(root)
    8383{
    84   /*
    85     char* temp;
    86     const char* string;
    87     string = grabParameter( root, "name");
    88     if( string == NULL)
    89     {
    90     PRINTF0("Player is missing a proper 'name'\n");
    91     string = "Unknown";
    92     temp = new char[strlen(string + 2)];
    93     strcpy( temp, string);
    94     this->setName( temp);
    95     }
    96     else
    97     {
    98     temp = new char[strlen(string + 2)];
    99     strcpy( temp, string);
    100     this->setName( temp);
    101     }
    102    
    103     this->model = NULL;
    104     string = grabParameter( root, "model");
    105     if( string != NULL)
    106     this->model = (Model*)ResourceManager::getInstance()->load(string, OBJ, RP_CAMPAIGN);
    107     else
    108     {
    109     PRINTF0("Player is missing a proper 'model'\n");
    110     this->model = (Model*)ResourceManager::getInstance()->load("models/reaplow.obj", OBJ, RP_CAMPAIGN);
    111     }
    112     if( this->model == NULL)
    113     {
    114     PRINTF0("Player model '%s' could not be loaded\n", string);
    115     }
    116   */
    11784  this->weapons = new tList<Weapon>();
    11885  this->activeWeapon = NULL;
  • orxonox/trunk/src/world_entities/world_entity.cc

    r4013 r4114  
    3030/**
    3131   \brief standard constructor
    32    
    33    Every derived contructor HAS to call the previous one supplying the isFree parameter. This is necessary to distunguish
    34    between free and bound entities. The difference between them is simply the fact that the movement of a free entity is
    35    not bound to the track of a world. Use this to implement projectile or effect classes that do not have to travel along the track.
    36    To specify an entity to be free or bound set the default parameter in the declaration of the constructor.
    37    Theoretically you should never have to call the constructor of an Entity directly, for it is called by the spawn() function of the World
    38    class. So if you want to create a new entity at any time, call World::spawn(). It will handle everything that is necessary.
    3932*/
    4033WorldEntity::WorldEntity ()
     
    4639}
    4740
     41/**
     42   \brief Loads the WordEntity-specific Part of any derived Class
     43*/
    4844WorldEntity::WorldEntity(TiXmlElement* root)
    4945{
     
    5450  if( string == NULL)
    5551    {
    56       PRINTF(0)("WorldEntity is missing a proper 'name'\n");
     52      PRINTF(2)("WorldEntity is missing a proper 'name'\n");
    5753      string = "Unknown";
    5854      temp = new char[strlen(string + 2)];
     
    6965  this->model = NULL;
    7066  string = grabParameter( root, "model");
     67  printf("::::::::::::::::::::::string is %s\n", string);
    7168  if( string != NULL)
    7269    this->model = (Model*)ResourceManager::getInstance()->load(string, OBJ, RP_CAMPAIGN);
    7370  else
    7471    {
    75       PRINTF(0)("WorldEntity is missing a proper 'model'\n");
     72      PRINTF(2)("WorldEntity is missing a proper 'model'\n");
    7673      this->model = NULL;
    7774    }
    7875  if( this->model == NULL)
    7976    {
    80       PRINTF(0)("WorldEntity model '%s' could not be loaded\n", string);
    81     }
    82 
     77      PRINTF(2)("WorldEntity model '%s' could not be loaded\n", string);
     78    }
    8379  this->bDraw = true;
    8480}
Note: See TracChangeset for help on using the changeset viewer.