Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11170


Ignore:
Timestamp:
Apr 21, 2016, 3:33:48 PM (9 years ago)
Author:
sagerj
Message:

running backup

Location:
code/branches/sagerjFS16
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sagerjFS16/data/levels/includes/weaponSettingsEscort.oxi

    r11166 r11170  
    11    <weaponslots>
    2       <WeaponSlot position="-9.2,2,-13" />
     2      <WeaponSlot
     3        position="-9.2,2,-13"
     4      />
     5    </weaponslots>
    36
    4     </weaponslots>
    57    <weaponsets>
    6       <WeaponSet firemode=0 />
    7 
     8      <WeaponSet
     9        firemode=0
     10      />
    811    </weaponsets>
     12   
    913    <weaponpacks>
    1014      <WeaponPack>
    1115        <links>
    12           <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
    13 
     16          <DefaultWeaponmodeLink
     17            firemode=0
     18            weaponmode=0
     19          />
    1420        </links>
    1521        <Weapon>
    16           <Discharger mode=0 munitionpershot=1 delay=0     damage=9.3 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" projectileMesh="LaserBeam2.mesh" />
     22          <Discharger
     23            mode=0
     24            munitionpershot=1
     25            delay=0
     26            damage=9.3
     27            material="Flares/point_lensflare"
     28            muzzleoffset=" 1.6, 1.3, -2.0"
     29            projectileMesh="LaserBeam2.mesh"
     30          />
    1731        </Weapon>
    1832   
     
    2135    </weaponpacks>
    2236    <munition>
    23       <LaserMunition initialmagazines=8 maxmagazines=8 munitionpermagazine=10 replenishamount=1 replenishinterval=7.5/>
     37      <LaserMunition
     38        initialmagazines=8
     39        maxmagazines=8
     40        munitionpermagazine=10
     41        replenishamount=1
     42        replenishinterval=7.5
     43      />
    2444    </munition>
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc

    r11166 r11170  
    5151        RegisterObject(Discharger);
    5252
     53        this->reloadTime_ = 0.23f;
     54        this->damage_ = 90.01f;
     55        this->speed_ = 90.01f;
     56        this->charges_ = 0;
     57
    5358        this->setMunitionName("LaserMunition");
     59        this->setFireSound("sounds/Weapon_LaserFire.ogg");
     60        this->setReloadSound("sounds/Reload_LaserFire.ogg", 0.8);
    5461
    5562        hudImageString_ = "Orxonox/WSHUD_WM_LaserFire";
     
    5865    void Discharger::fire()
    5966    {
    60         orxout() << "fire dis " << endl;
     67        charges_ += 1;
     68        orxout() << "c = " << charges_ << endl;
    6169    }
    6270   
    63     bool Discharger::fire(float* reloadTime)
     71    void Discharger::release()
    6472    {
    65         orxout() << "fire Discharger " << endl;
    66         return false;
    67     }
    68     bool Discharger::release(float* reloadTime)
    69     {
    70         orxout() << "release Discharger " << endl;
    71         return false;
     73        orxout() << "release c = " << charges_ << endl;
     74        BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
     75
     76        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
     77        projectile->setOrientation(this->getMuzzleOrientation());
     78        projectile->setPosition(this->getMuzzlePosition());
     79        projectile->setVelocity(this->getMuzzleDirection() * this->speed_ * charges_);
     80
     81        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
     82        projectile->setDamage(this->getDamage() * charges_);
     83        projectile->setShieldDamage(this->getShieldDamage() * charges_);
     84        projectile->setHealthDamage(this->getHealthDamage() * charges_);
     85        this->charges_ = 0;
    7286    }
    7387}
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h

    r11166 r11170  
    5555
    5656            virtual void fire() override;
    57             virtual bool fire(float* reloadTime) override;
    58             virtual bool release(float* reloadTime) override;
     57            virtual void release() override;
    5958
    6059        private:
     60            float speed_; // The speed of the fired projectile.
     61            unsigned int charges_; // An indicator of how much you charged up.
    6162    };
    6263}
  • code/branches/sagerjFS16/src/orxonox/controllers/HumanController.cc

    r11166 r11170  
    159159    void HumanController::fire(unsigned int firemode)
    160160    {
    161         orxout() << "fire hc " << firemode << endl;
    162161        if (HumanController::localController_s)
    163162            HumanController::localController_s->doFire(firemode);
     
    166165    void HumanController::doFire(unsigned int firemode)
    167166    {
    168         orxout() << "do fire hc " << firemode << endl;
    169167        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    170168        {
     
    180178    void HumanController::release(unsigned int firemode)
    181179    {
    182         orxout() << "release hc " << firemode << endl;
    183180        if (HumanController::localController_s)
    184181            HumanController::localController_s->doRelease(firemode);
     
    187184    void HumanController::doRelease(unsigned int firemode)
    188185    {
    189         orxout() << "do release hc " << firemode << endl;
    190186        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    191187        {
  • code/branches/sagerjFS16/src/orxonox/controllers/NewHumanController.cc

    r11166 r11170  
    285285        if (firemode == 1 && this->controlMode_ == 1)
    286286        {
    287             orxout() << "do fire nhc if " << firemode << endl;
    288287            //unlocked steering, steer on right mouse click
    289288            HumanController::yaw(Vector2(this->currentYaw_, 0));
     
    292291        else
    293292        {
    294             orxout() << "do fire nhc else " << firemode << endl;
    295293            HumanController::doFire(firemode); //call for formationflight
    296294        }
     
    299297    void NewHumanController::doRelease(unsigned int firemode)
    300298    {
    301         orxout() << "do release nhc" << firemode << endl;
    302299        if (!this->controllableEntity_)
    303300            return;
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/Weapon.cc

    r11166 r11170  
    114114        // Note: The reloading of each WeaponMode is internally handled by each A, B and C.
    115115        //       The reloading of the weapon is only performed to avoid firing with different modes at the same time.
    116         orxout() << "fire weapon " << mode << endl;
     116   
     117   
    117118        if (this->bReloading_ && this->reloadingWeaponmode_ != mode)
    118119            return;
     
    137138    void Weapon::release(unsigned int mode)
    138139    {
    139         orxout() << "release weapon " << mode << endl;
    140140        if (this->bReloading_ && this->reloadingWeaponmode_ != mode)
    141141            return;
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.cc

    r11166 r11170  
    121121    {
    122122        (*reloadTime) = this->reloadTime_;
    123         orxout() << "fire wm " << reloadTime << endl;
    124123        // Fireing is only possible if this weapon mode is not reloading and there is enough munition
    125124        if (!this->bReloading_ && this->munition_ && this->munition_->takeMunition(this->munitionPerShot_, this))
     
    171170    bool WeaponMode::release(float* reloadTime)
    172171    {
    173         orxout() << "release wm " << reloadTime << endl;
     172        this->release();
    174173        return false;
    175174    }
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.h

    r11166 r11170  
    165165
    166166            virtual void fire() = 0;
     167            virtual void release() {};
    167168
    168169            unsigned int initialMunition_;
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponPack.cc

    r11166 r11170  
    7676    void WeaponPack::fire(unsigned int weaponmode)
    7777    {
    78         orxout() << "fire wp " << weaponmode << endl;
    7978        for (Weapon* weapon : this->weapons_)
    8079            weapon->fire(weaponmode);
     
    8382    void WeaponPack::release(unsigned int weaponmode)
    8483    {
    85         orxout() << "release wp " << weaponmode << endl;
    8684        for (Weapon* weapon : this->weapons_)
    8785            weapon->release(weaponmode);
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSet.cc

    r11166 r11170  
    6363    {
    6464        // Fire all WeaponPacks with their defined weaponmode
    65         orxout() << "fire wset " << endl;
    6665        for (const auto& mapEntry : this->weaponpacks_)
    6766            if (mapEntry.second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
     
    7271    {
    7372        // Fire all WeaponPacks with their defined weaponmode
    74         orxout() << "release wset " << endl;
    7573        for (const auto& mapEntry : this->weaponpacks_)
    7674            if (mapEntry.second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
  • code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponSystem.cc

    r11166 r11170  
    289289    void WeaponSystem::fire(unsigned int firemode)
    290290    {
    291         orxout() << "fire wsys " << firemode << endl;
    292291        std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.find(firemode);
    293292        if (it != this->weaponSets_.end() && it->second)
     
    297296    void WeaponSystem::release(unsigned int firemode)
    298297    {
    299         orxout() << "release wsys " << firemode << endl;
    300298        std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.find(firemode);
    301299        if (it != this->weaponSets_.end() && it->second)
  • code/branches/sagerjFS16/src/orxonox/worldentities/ControllableEntity.cc

    r11166 r11170  
    303303        if(GameMode::isMaster())
    304304        {
    305             orxout() << "fire ce if " << firemode << endl;
    306305            this->fired(firemode);
    307306        }
    308307        else
    309308        {
    310             orxout() << "fire ce else " << firemode << endl;
    311309            callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode);
    312310        }
     
    317315        if(GameMode::isMaster())
    318316        {
    319             orxout() << "release ce if " << firemode << endl;
    320317            this->released(firemode);
    321318        }
    322319        else
    323320        {
    324             orxout() << "release ce else " << firemode << endl;
    325321            callMemberNetworkFunction(&ControllableEntity::fire, this->getObjectID(), 0, firemode);
    326322        }
  • code/branches/sagerjFS16/src/orxonox/worldentities/pawns/Pawn.cc

    r11166 r11170  
    430430    void Pawn::fired(unsigned int firemode)
    431431    {
    432         orxout() << "fired pawn " << firemode << endl;
    433432        if (this->weaponSystem_)
    434433            this->weaponSystem_->fire(firemode);
     
    437436    void Pawn::released(unsigned int firemode)
    438437    {
    439         orxout() << "released pawn " << firemode << endl;
    440438        if (this->weaponSystem_)
    441439            this->weaponSystem_->release(firemode);
Note: See TracChangeset for help on using the changeset viewer.