Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9712 in orxonox.OLD for branches/new_class_id


Ignore:
Timestamp:
Sep 1, 2006, 12:52:29 AM (18 years ago)
Author:
bensch
Message:

fixed minority reports

Location:
branches/new_class_id/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/loading/factory.cc

    r9709 r9712  
    9999BaseObject* Factory::fabricate(const TiXmlElement* root)
    100100{
    101   assert (root != NULL && Factory::_factoryList != NULL);
     101  assert (Factory::_factoryList != NULL);
    102102
    103103  std::list<Factory*>::const_iterator factory;
  • branches/new_class_id/src/story_entities/game_world_data.cc

    r9709 r9712  
    117117ErrorMessage GameWorldData::loadData(const TiXmlElement* root)
    118118{
     119  assert (root != NULL);
    119120  // load the parameters
    120121  // name
     
    237238  {
    238239    /// TODO Make this also loadable
    239     this->localPlayer->setPlayable(Playable::objectList().back());
     240    this->localPlayer->setPlayable(Playable::objectList().front());
    240241  }
    241242
  • branches/new_class_id/src/world_entities/npcs/space_turret.cc

    r9709 r9712  
    3838 */
    3939SpaceTurret::SpaceTurret(const TiXmlElement* root)
    40   : NPC(root)
     40    : NPC(root)
    4141{
    4242  this->init();
     
    5050 */
    5151SpaceTurret::~SpaceTurret ()
    52 {
    53 
    54 }
     52{}
    5553
    5654
     
    10098
    10199  element = root->FirstChildElement("weapon-left");
    102   if (element != NULL) element = element->FirstChildElement();
    103   this->left = dynamic_cast<Weapon*>( Factory::fabricate( element) );
     100  if (element != NULL)
     101    element = element->FirstChildElement();
     102  if (element != NULL)
     103    this->left = dynamic_cast<Weapon*>( Factory::fabricate( element) );
    104104  if (this->left)
    105105  {
     
    114114
    115115  element = root->FirstChildElement("weapon-right");
    116   if (element != NULL)  if (element != NULL) element = element->FirstChildElement();
    117   this->right = dynamic_cast<Weapon*>( Factory::fabricate( element) );
     116  if (element != NULL)
     117    element = element->FirstChildElement();
     118  if (element != NULL)
     119    this->right = dynamic_cast<Weapon*>( Factory::fabricate( element) );
    118120  if (this->right)
    119121  {
     
    134136 */
    135137void SpaceTurret::setWeaponLeft(const std::string& wLeft)
    136 {
    137 
    138 }
     138{}
    139139
    140140/**
     
    152152{
    153153  if(this->getHealth() > 0.0f && State::getPlayer() &&
    154      State::getPlayer()->getPlayable() &&
    155      State::getPlayer()->getPlayable()->distance(this) < 300) // HACK
    156   {
    157   if (likely(this->left != NULL))
    158   {
    159 //    this->left->tickW(dt);
    160     this->left->requestAction(WA_SHOOT);
    161   }
    162   if (likely(this->right != NULL))
    163   {
    164 //    this->right->tickW(dt);
    165     this->right->requestAction(WA_SHOOT);
    166   }
     154      State::getPlayer()->getPlayable() &&
     155      State::getPlayer()->getPlayable()->distance(this) < 300) // HACK
     156  {
     157    if (likely(this->left != NULL))
     158    {
     159      //    this->left->tickW(dt);
     160      this->left->requestAction(WA_SHOOT);
     161    }
     162    if (likely(this->right != NULL))
     163    {
     164      //    this->right->tickW(dt);
     165      this->right->requestAction(WA_SHOOT);
     166    }
    167167  }
    168168}
     
    185185    this->getModel(3)->draw();
    186186  glPopMatrix();
    187 /*
    188   if (this->left != NULL)
    189     this->left->draw();
    190   if (this->right != NULL)
    191     this->right->draw();*/
     187  /*
     188    if (this->left != NULL)
     189      this->left->draw();
     190    if (this->right != NULL)
     191      this->right->draw();*/
    192192}
    193193
     
    199199 */
    200200void SpaceTurret::postSpawn ()
    201 {
    202 
    203 }
     201{}
    204202
    205203/**
     
    208206 */
    209207void SpaceTurret::leftWorld ()
    210 {
    211 
    212 }
     208{}
    213209
    214210void SpaceTurret::destroy(WorldEntity* killer)
Note: See TracChangeset for help on using the changeset viewer.