- Timestamp:
- Nov 9, 2015, 5:55:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/fabienHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc
r10688 r10791 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/command/Executor.h" 38 #include "core/XMLPort.h" 38 39 39 40 namespace orxonox … … 46 47 47 48 this->replenishInterval_ = 1.0f; 48 this->replenish MunitionAmount_ = 1;49 this->replenishAmount_ = 1; 49 50 50 51 // Use the timer to initialize itself after the first tick (because the real values for … … 53 54 this->replenishingTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&ReplenishingMunition::initializeTimer, this))); 54 55 } 56 57 void ReplenishingMunition::XMLPort(Element& xmlelement, XMLPort::Mode mode) 58 { 59 SUPER(ReplenishingMunition, XMLPort, xmlelement, mode); 60 61 XMLPortParam(ReplenishingMunition, "replenishamount", setReplenishAmount, getReplenishAmount, xmlelement, mode); 62 XMLPortParam(ReplenishingMunition, "replenishinterval", setReplenishInterval, getReplenishInterval, xmlelement, mode); 63 } 55 64 56 65 float ReplenishingMunition::getProgress() … … 67 76 void ReplenishingMunition::replenish() 68 77 { 69 if (this->canAddMunition(this->replenish MunitionAmount_))78 if (this->canAddMunition(this->replenishAmount_)) 70 79 { 71 80 // Make a temporary copy of bAllowMunitionRefilling_, because this might be disallowed in every … … 75 84 76 85 // Replenish munition 77 this->addMunition(this->replenish MunitionAmount_);86 this->addMunition(this->replenishAmount_); 78 87 79 88 // Write back the temporary value
Note: See TracChangeset
for help on using the changeset viewer.