Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11164


Ignore:
Timestamp:
Apr 14, 2016, 1:11:00 PM (9 years ago)
Author:
sagerj
Message:

added orxout() for every release lvl for debug purpose

Location:
code/branches/sagerjFS16/src/orxonox
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sagerjFS16/src/orxonox/controllers/HumanController.cc

    r11153 r11164  
    178178    void HumanController::release(unsigned int firemode)
    179179    {
     180        orxout() << "HumanController " << firemode << endl;
    180181        if (HumanController::localController_s)
    181182            HumanController::localController_s->doRelease(firemode);
  • code/branches/sagerjFS16/src/orxonox/controllers/HumanController.h

    r11153 r11164  
    6363            static void fire(unsigned int firemode);
    6464            virtual void doFire(unsigned int firemode);
    65             static void reload();
    6665            static void release(unsigned int firemode);
    6766            virtual void doRelease(unsigned int firemode);
     67            static void reload();
    6868
    6969            static void boost(const Vector2& value); // Static method, controls boosting.
  • code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.cc

    r11153 r11164  
    5454    SetConsoleCommand("NewHumanController", "accelerate", &NewHumanController::accelerate).keybindMode(KeybindMode::OnPress);
    5555    SetConsoleCommand("NewHumanController", "decelerate", &NewHumanController::decelerate).keybindMode(KeybindMode::OnPress);
    56     SetConsoleCommand("NewHumanController", "release",    &NewHumanController::release    ).keybindMode(KeybindMode::OnRelease).addShortcut();
     56    //SetConsoleCommand("NewHumanController", "release",    &NewHumanController::release   ).keybindMode(KeybindMode::OnRelease).addShortcut();
    5757
    5858    RegisterUnloadableClass(NewHumanController);
     
    294294    }
    295295
     296    /*void NewHumanController::release(unsigned int firemode)
     297    {
     298        if (NewHumanController::localController_s)
     299            NewHumanController::localController_s->doRelease(firemode);
     300        orxout() << "Trigger " << firemode << endl;
     301    }
     302
     303    /void NewHumanController::doRelease(unsigned int firemode)
     304    {
     305        // this->firemode_ = -1; (outdated code from unfire)
     306        // hideArrows();
     307        if (!this->controllableEntity_)
     308            return;
     309
     310        this->firemode_ = firemode;
     311
     312        HumanController::doRelease(firemode); //call for formationflight
     313    }*/
     314
    296315    void NewHumanController::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage)
    297316    {
     
    342361            }
    343362        }
    344     }
    345 
    346     void NewHumanController::release(unsigned int firemode)
    347     {
    348         if (NewHumanController::localController_s)
    349             NewHumanController::localController_s->doRelease();
    350         orxout() << "Trigger" << endl;
    351     }
    352 
    353     void NewHumanController::doRelease(unsigned int firemode)
    354     {
    355         // this->firemode_ = -1; (outdated code from unfire)
    356         // hideArrows();
    357         if (!this->controllableEntity_)
    358             return;
    359 
    360         this->firemode_ = firemode;
    361 
    362         HumanController::doRelease(firemode); //call for formationflight
    363363    }
    364364
  • code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.h

    r11153 r11164  
    5555
    5656            virtual void doFire(unsigned int firemode) override;
     57            /*virtual void release(unsigned int firemode);
     58            virtual void doRelease(unsigned int firemode);*/
    5759
    5860            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) override;
    59 
    60             static void release(unsigned int firemode);
    61             virtual void doRelease(unsigned int firemode);
    6261
    6362            void centerCursor();
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/Weapon.cc

    r11071 r11164  
    134134    }
    135135
     136    void Weapon::release(unsigned int mode)
     137    {orxout() << "release weapon " << mode << endl;}
     138
    136139    /**
    137140    @brief
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/Weapon.h

    r11071 r11164  
    5353
    5454            void fire(unsigned int mode);
     55            void release(unsigned int mode);
    5556            void reload();
    5657
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.cc

    r11153 r11164  
    169169    }
    170170
    171     void WeaponMode::release()
     171    void WeaponMode::release(float* reloadTime)
     172    {orxout() << "release wmode " << reloadTime << endl;}
    172173
    173174    bool WeaponMode::reload()
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.h

    r11142 r11164  
    5858
    5959            virtual bool fire(float* reloadTime);
     60            virtual void release(float* reloadTime);
    6061            bool reload();
    6162
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponPack.cc

    r11071 r11164  
    7878        for (Weapon* weapon : this->weapons_)
    7979            weapon->fire(weaponmode);
     80    }
     81
     82    void WeaponPack::release(unsigned int weaponmode)
     83    {
     84        for (Weapon* weapon : this->weapons_)
     85            weapon->release(weaponmode);
     86        orxout() << "release wpack " << weaponmode << endl;
    8087    }
    8188
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponPack.h

    r11071 r11164  
    4747
    4848            void fire(unsigned int weaponmode);
     49            void release(unsigned int weaponmode);
    4950            void reload();
    5051
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSet.cc

    r11071 r11164  
    6868    }
    6969
     70    void WeaponSet::release()
     71    {
     72       
     73        // Fire all WeaponPacks with their defined weaponmode
     74        for (const auto& mapEntry : this->weaponpacks_)
     75            if (mapEntry.second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
     76                mapEntry.first->release(mapEntry.second);
     77        orxout() << "release wset " << endl;
     78       
     79    }
     80
    7081    void WeaponSet::reload()
    7182    {
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSet.h

    r11071 r11164  
    4747
    4848            void fire();
     49            void release();
    4950            void reload();
    5051
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSystem.cc

    r11153 r11164  
    299299        if (it != this->weaponSets_.end() && it->second)
    300300            it->second->release();
     301        orxout() << "release wsys " << firemode << endl;
    301302    }
    302303
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSystem.h

    r11153 r11164  
    7575
    7676            void fire(unsigned int firemode);
     77            void release(unsigned int firemode);
    7778            void reload();
    78             void release(unsigned int firemode);
    7979
    8080            Munition * getMunition(SubclassIdentifier<Munition> * identifier);
  • code/branches/sagerjFS16/src/orxonox/worldentities/ControllableEntity.cc

    r11071 r11164  
    303303        if(GameMode::isMaster())
    304304        {
     305            orxout() << "f CE IF " << firemode << endl;
    305306            this->fired(firemode);
    306307        }
    307308        else
    308309        {
     310            orxout() << "f CE EL " << firemode << endl;
     311            callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode);
     312        }
     313    }
     314
     315    void ControllableEntity::release(unsigned int firemode)
     316    {
     317        if(GameMode::isMaster())
     318        {
     319            orxout() << "r CE IF " << firemode << endl;
     320            this->released(firemode);
     321        }
     322        else
     323        {
     324            orxout() << "r CE EL " << firemode << endl;
    309325            callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode);
    310326        }
  • code/branches/sagerjFS16/src/orxonox/worldentities/ControllableEntity.h

    r11071 r11164  
    9797
    9898            void fire(unsigned int firemode);
     99            void release(unsigned int firemode);
    99100            virtual void fired(unsigned int firemode) {}
     101            virtual void released(unsigned int firemode) {}
    100102            virtual void reload() {}
    101103
Note: See TracChangeset for help on using the changeset viewer.