- Timestamp:
- Apr 28, 2016, 3:09:26 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.cc
r11174 r11175 63 63 this->bAutoReload_ = true; 64 64 this->bParallelReload_ = true; 65 this->chargeable_ = false; 65 66 66 67 this->reloadTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&WeaponMode::reloaded, this))); … … 120 121 bool WeaponMode::fire(float* reloadTime) 121 122 { 123 orxout() << "--- " << endl; 122 124 (*reloadTime) = this->reloadTime_; 123 125 // Fireing is only possible if this weapon mode is not reloading and there is enough munition … … 170 172 bool WeaponMode::push(float* reloadTime) 171 173 { 174 orxout() << "push " << chargeable_ << endl; 172 175 if( this->chargeable_) 173 176 { 174 177 // setting up a timer for knowing how long the weapon was charged 175 178 // and passes the value to this->cTime_ 179 orxout() << "if " << endl; 180 return false; 176 181 } else { 182 orxout() << "else " << endl; 177 183 return fire(reloadTime); 178 184 } 179 180 185 } 181 186 182 187 bool WeaponMode::release(float* reloadTime) 183 188 { 189 orxout() << "release " << endl; 184 190 if( this->chargeable_) 185 { 191 { 192 orxout() << "if " << endl; 186 193 return fire(reloadTime); 194 }else{ 195 orxout() << "else " << endl; 196 return false; 187 197 } 188 198 }
Note: See TracChangeset
for help on using the changeset viewer.