Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6218 for code


Ignore:
Timestamp:
Dec 2, 2009, 10:20:37 PM (15 years ago)
Author:
rgrieder
Message:

Fixed at least 8 unitialised value problems though not all of them are problematic. Still, the values are being used and some condition depends on it.

Location:
code/branches/presentation2/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/ConfigValueContainer.h

    r5738 r6218  
    146146                if ((this->callback_ && object) || this->bContainerIsNew_)
    147147                {
    148                     if (this->bContainerIsNew_)
    149                         this->bContainerIsNew_ = false;
    150 
    151148                    T temp = *value;
    152149                    this->value_.getValue(value);
    153                     if ((*value) != temp)
     150                    if (this->bContainerIsNew_ || (*value) != temp)
    154151                    {
    155152                        if (this->callback_ && object)
     
    158155                            this->bDoInitialCallback_ = true;
    159156                    }
     157
     158                    if (this->bContainerIsNew_)
     159                        this->bContainerIsNew_ = false;
    160160                }
    161161                else
  • code/branches/presentation2/src/libraries/tools/ParticleInterface.cc

    r6213 r6218  
    6464        this->bAllowedByLOD_ = true;
    6565        this->speedFactor_ = 1.0f;
     66
     67        this->setDetailLevel(static_cast<unsigned int>(detaillevel));
    6668
    6769        this->setConfigValues();
     
    8082            }
    8183        }
    82 
    83         this->setDetailLevel(static_cast<unsigned int>(detaillevel));
    8484    }
    8585
  • code/branches/presentation2/src/libraries/tools/Shader.cc

    r5781 r6218  
    7979    Shader::~Shader()
    8080    {
    81 
    82         if (this->bLoadCompositor_ && this->compositorInstance_)
     81        if (this->compositorInstance_ && this->bLoadCompositor_)
    8382        {
    8483            Ogre::Viewport* viewport = GraphicsManager::getInstance().getViewport();
  • code/branches/presentation2/src/modules/overlays/hud/HUDBar.cc

    r5929 r6218  
    8585
    8686        this->value_ = 1.0f;  // initielize with 1.0f to trigger a change when calling setValue(0.0f) on the line below
     87        this->setAutoColour(true);
    8788        this->setValue(0.0f); // <--
    8889        this->setRightToLeft(false);
    89         this->setAutoColour(true);
    9090        this->currentColour_ = ColourValue::White;
    9191
  • code/branches/presentation2/src/orxonox/interfaces/RadarViewable.cc

    r5929 r6218  
    5151        , line_(NULL)
    5252        , LineNode_(NULL)
     53        , isHumanShip_(false)
     54        , bVisibility_(false)
    5355        , radarObjectCamouflage_(0.0f)
    5456        , radarObjectShape_(Dot)
     
    5658    {
    5759        RegisterRootObject(RadarViewable);
    58 
    59         this->bVisibility_ = true;
    60         this->isHumanShip_ = false;
    6160
    6261        this->uniqueId_=getUniqueNumberString();
  • code/branches/presentation2/src/orxonox/overlays/Map.cc

    r5929 r6218  
    9494
    9595        //Getting Scene Manager (Hack)
    96         if( !sManager_ )
    97         {
    98             ObjectList<Scene>::iterator it = ObjectList<Scene>::begin();
    99             this->sManager_ = it->getSceneManager();
    100         }
     96        ObjectList<Scene>::iterator it = ObjectList<Scene>::begin();
     97        this->sManager_ = it->getSceneManager();
    10198        if( !Map::getMapSceneManager() )
    10299        {
  • code/branches/presentation2/src/orxonox/overlays/OrxonoxOverlay.cc

    r6057 r6218  
    8383        // Get aspect ratio from the render window. Later on, we get informed automatically
    8484        this->windowAspectRatio_ = static_cast<float>(this->getWindowWidth()) / this->getWindowHeight();
    85         this->sizeCorrectionChanged();
    86 
    87         this->changedVisibility();
    88 
    89         setSize(Vector2(1.0f, 1.0f));
    90         setPickPoint(Vector2(0.0f, 0.0f));
    91         setPosition(Vector2(0.0f, 0.0f));
    92         setRotation(Degree(0.0));
    93         setAspectCorrection(false);
     85
     86        this->size_ = Vector2(1.0f, 1.0f);
     87        this->pickPoint_= Vector2(0.0f, 0.0f);
     88        this->position_ = Vector2(0.0f, 0.0f);
     89        this->angle_ = Degree(0.0);
     90        this->bCorrectAspect_ = false;
     91        this->rotState_ = Horizontal;
     92        this->angleChanged(); // updates all other values as well
     93
    9494        setBackgroundMaterial("");
    9595    }
Note: See TracChangeset for help on using the changeset viewer.