Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 7, 2008, 3:39:48 PM (16 years ago)
Author:
landauf
Message:
  • AI ships are now displayed with a point with its teamcolour on the radar.
  • It's now possible to assign an arbitrary colour (and even a texture) to a RadarObject. But be aware the system has to create a new material for every colour (not for every object), so please use deterministic colours to reduce the amount of used materials to a bearable number.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1559 r1562  
    151151                delete this->cam_;
    152152
    153             if (!myShip_ && &HUD::getSingleton()!=NULL)
    154               HUD::getSingleton().removeRadarObject(this->getNode());
     153            if (!this->myShip_)
     154                HUD::getSingleton().removeRadarObject(this->getNode());
    155155        }
    156156    }
     
    161161          myShip_=true;
    162162        else
    163           HUD::getSingleton().addRadarObject(this->getNode(), 3);
     163          HUD::getSingleton().addRadarObject(this->getNode(), this->getProjectileColour());
    164164      }
    165165      if(Model::create())
     
    282282    void SpaceShip::setCamera(const std::string& camera)
    283283    {
     284      myShip_=true; // TODO: this is only a hack
    284285      camName_=camera;
    285286      // change camera attributes here, if you want to ;)
     
    353354        XMLPortParamLoadOnly(SpaceShip, "transDamp", setTransDamp, xmlelement, mode);
    354355        XMLPortParamLoadOnly(SpaceShip, "rotDamp", setRotDamp, xmlelement, mode);
    355         myShip_=true; // TODO: this is only a hack
    356356
    357357        SpaceShip::create();
Note: See TracChangeset for help on using the changeset viewer.