Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10794


Ignore:
Timestamp:
Nov 10, 2015, 7:47:39 PM (9 years ago)
Author:
fvultier
Message:

bug in the WeaponHUD fixed.

Location:
code/branches/fabienHS15
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/data/overlays/jumpHUD.oxo

    r10262 r10794  
    3737     showFuel = false
    3838     showMessages = true
    39     />   
    40 
    41   <HUDBar
    42      name          = "SpeedBar1"
    43      background    = "Orxonox/BarBackground"
    44      size          = "0.35, 0.05"
    45      position      = "0.0 , 1.0 "
    46      pickpoint     = "0, 1"
    47      correctaspect = false
    48 
    49      initialvalue = 50
    50 
    51      >
    52       <BarColour position = 0.0 colour = "0.7,0.5,0.2" />
    53       <BarColour position = 0.5 colour = "0.2,0.7,0.2" />
    54       <BarColour position = 1.0 colour = "0.7,0.2,0.2" />
    55     </HUDBar>
     39    />
    5640
    5741  </OverlayGroup>
  • code/branches/fabienHS15/src/modules/overlays/hud/HUDWeapon.cc

    r10739 r10794  
    112112    {
    113113        SUPER(HUDWeapon, changedVisibility);
     114
     115        bool visible = this->isVisible();
     116
     117        for (std::vector<WeakPtr<HUDWeaponMode> >::iterator it = hudWeaponModes_.begin(); it != hudWeaponModes_.end(); ++it)
     118        {
     119            (*it)->setVisible(visible);
     120        }
    114121    }
    115122
  • code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponMode.cc

    r10791 r10794  
    9393        textOverlayRight_->setZOrder(600);
    9494
    95         materialNameState_ = "Orxonox/WSHUD_Empty";
     95        materialNameState_ = "";
    9696
    9797        overlayElementReplenish_->setMaterialName("Orxonox/WSHUD_Replenish");
     
    198198
    199199        this->owner_ = orxonox_cast<Pawn*>(this->getOwner());
     200
     201        materialNameState_ = ""; // Needed to set the material in the tick ater a change of the owner.
    200202    }
    201203
     
    212214        SUPER(HUDWeaponMode, changedVisibility);
    213215
    214         this->textOverlayLeft_->setVisible(this->isVisible());
    215         this->textOverlayRight_->setVisible(this->isVisible());
     216        bool visible = this->isVisible();
     217
     218        this->textOverlayLeft_->setVisible(visible);
     219        this->textOverlayRight_->setVisible(visible);
     220
     221        if (visible)
     222        {
     223            overlayElementIcon_->show();
     224            overlayElementReplenish_->show();
     225            overlayElementMunition_->show();
     226            overlayElementState_->show();
     227        }
    216228    }
    217229
  • code/branches/fabienHS15/src/modules/overlays/hud/HUDWeaponSystem.cc

    r10739 r10794  
    100100    {
    101101        SUPER(HUDWeaponSystem, changedVisibility);
     102
     103        bool visible = this->isVisible();
     104
     105        for (std::vector<WeakPtr<HUDWeapon> >::iterator it = hudWeapons_.begin(); it != hudWeapons_.end(); ++it)
     106        {
     107            (*it)->setVisible(visible);
     108        }
    102109    }
    103110
  • code/branches/fabienHS15/src/modules/weapons/projectiles/Rocket.cc

    r10622 r10794  
    7676            Model* model = new Model(this->getContext());
    7777            model->setMeshSource("rocket.mesh");
    78             model->scale(0.7f);
     78            model->scale(1.0f);
    7979            this->attach(model);
    8080
     
    187187        SUPER(Rocket, tick, dt);
    188188
     189        orxout() << "Rocket::tick" << getScale() << endl;
     190
    189191        if( this->hasLocalController() )
    190192        {
  • code/branches/fabienHS15/src/modules/weapons/projectiles/SimpleRocket.cc

    r10299 r10794  
    7676            Model* model = new Model(this->getContext());
    7777            model->setMeshSource("rocket.mesh");
    78             model->scale(0.7f);
     78            model->scale(1.0f);
    7979            this->attach(model);
    8080
     
    116116    {
    117117        SUPER(SimpleRocket, tick, dt);
     118
     119        orxout() << "SimpleRocket::tick" << getScale() << endl;
    118120
    119121        if (GameMode::isMaster())
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFire.cc

    r10688 r10794  
    7979        rocket->setPosition(this->getMuzzlePosition());
    8080        rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
    81         rocket->scale(2);
     81        rocket->scale(1.0f);
    8282
    8383        rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/SimpleRocketFire.cc

    r10688 r10794  
    8585        rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
    8686        rocket->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
     87        rocket->scale(1.0f);
    8788
    8889        rocket->setDamage(this->damage_);
  • code/branches/fabienHS15/src/orxonox/weaponsystem/Munition.h

    r10791 r10794  
    4343        enum Value
    4444        {
    45             Share,
    46             Stack,
    47             Separate
     45            Separate, // Every comsuming weapon mode has its own magazine. It is possible that one weapon mode is out of ammo while another still has some.
     46            Share, // All comsuming weapon modes take their munition from the same magazine. If this magazine is empty a new one is loaded.
     47            Stack // There is only one magazine where all the munition is stored. Use this deployment mode for heavy weapons loke rockets, bombs, ...
    4848        };
    4949    }
Note: See TracChangeset for help on using the changeset viewer.