Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 17, 2015, 10:30:24 PM (8 years ago)
Author:
fvultier
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/src/modules/weapons/weaponmodes/RocketFire.cc

    r10794 r10814  
    4141#include "weaponsystem/WeaponSystem.h"
    4242#include "worldentities/pawns/Pawn.h"
    43 
     43#include "core/XMLPort.h"
    4444#include "weapons/projectiles/Rocket.h"
    4545
     
    5656        this->damage_ = 0.0f;
    5757        this->speed_ = 500.0f;
     58        this->fuel_ = 10.0f;
    5859
    5960        this->setMunitionName("RocketMunition");
     
    6566    RocketFire::~RocketFire()
    6667    {
     68    }
     69
     70    /**
     71    @brief
     72        XMLPort for the RocketFire. You can define the maximum lifetime of the rockets
     73    */
     74    void RocketFire::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     75    {
     76        SUPER(RocketFire, XMLPort, xmlelement, mode);
     77
     78        XMLPortParam(RocketFire, "fuel", setFuel, getFuel, xmlelement, mode);
    6779    }
    6880
     
    8597        rocket->setShieldDamage(this->getShieldDamage());
    8698        rocket->setHealthDamage(this->getHealthDamage());
     99        rocket->setMaxFuel(this->fuel_);
    87100    }
    88101}
Note: See TracChangeset for help on using the changeset viewer.