Changeset 11185
- Timestamp:
- May 12, 2016, 4:03:47 PM (9 years ago)
- Location:
- code/branches/sagerjFS16
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/data/levels/includes/weaponSettingsEscort.oxi
r11170 r11185 24 24 munitionpershot=1 25 25 delay=0 26 damage= 9.326 damage=0.5 27 27 material="Flares/point_lensflare" 28 28 muzzleoffset=" 1.6, 1.3, -2.0" … … 36 36 <munition> 37 37 <LaserMunition 38 initialmagazines= 839 maxmagazines= 838 initialmagazines=2 39 maxmagazines=2 40 40 munitionpermagazine=10 41 41 replenishamount=1 42 replenishinterval= 7.542 replenishinterval=2 43 43 /> 44 44 </munition> -
code/branches/sagerjFS16/data/levels/missionOne.oxw
r11052 r11185 12 12 include("templates/lodInformation.oxt") 13 13 include("templates/spaceshipAssff.oxt") 14 include("templates/spaceshipEscort.oxt") 14 15 include("templates/spaceshipPirate.oxt") 15 16 include("templates/spaceshipSpacecruiser.oxt") … … 57 58 <events> 58 59 <trigger> 59 <TeamSpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceship assff>60 <TeamSpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort> 60 61 <EventTrigger invert=true> 61 62 <events> -
code/branches/sagerjFS16/data/overlays/HUDTemplates3.oxo
r11052 r11185 184 184 weaponModeHUDSize = "0.09, 0.03" 185 185 /> 186 187 <HUDChargeBar 188 name = "ChargeBar" 189 background = "Orxonox/BarBackground" 190 size = "0.40, 0.04" 191 position = "0.0 , 0.5 " 192 pickpoint = "0, 1" 193 correctaspect = true 194 iconmaterial = "Orxonox/BarIconSpeed" 195 > 196 <BarColour position = 0.0 colour = "0.7,0.5,0.2" /> 197 <BarColour position = 0.5 colour = "0.2,0.7,0.2" /> 198 <BarColour position = 1.0 colour = "0.7,0.2,0.2" /> 199 </HUDChargeBar> 186 200 187 201 <HUDTimer -
code/branches/sagerjFS16/src/modules/overlays/hud/CMakeLists.txt
r11052 r11185 14 14 HUDWeapon.cc 15 15 HUDWeaponSystem.cc 16 HUDChargeBar.cc 16 17 ChatOverlay.cc 17 18 AnnounceMessage.cc -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc
r11175 r11185 21 21 * 22 22 * Author: 23 * Martin Polak23 * God of everything 24 24 * Co-authors: 25 * simonmie25 * 26 26 * 27 27 */ … … 51 51 RegisterObject(Discharger); 52 52 53 this->reloadTime_ = 0.23f;54 this->damage_ = 90.01f;55 this->speed_ = 90.01f;53 this->reloadTime_ = 3.14159f; 54 this->damage_ = 0.0f; 55 this->speed_ = 100.0f; 56 56 this->chargeable_ = true; 57 57 … … 65 65 void Discharger::fire() 66 66 { 67 // orxout() << "release" << cTime_ << endl;68 67 BillboardProjectile* projectile = new BillboardProjectile(this->getContext()); 69 68 … … 71 70 projectile->setOrientation(this->getMuzzleOrientation()); 72 71 projectile->setPosition(this->getMuzzlePosition()); 73 projectile->setVelocity(this->getMuzzleDirection() * this->speed_ );72 projectile->setVelocity(this->getMuzzleDirection() * this->speed_ * this->charges_ / 5); 74 73 75 74 projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 76 projectile->setDamage(this->getDamage() * charges_);77 projectile->setShieldDamage(this->getShieldDamage() );78 projectile->setHealthDamage(this->getHealthDamage() );79 //this->charges_ = 0;75 projectile->setDamage(this->getDamage() * this->charges_); 76 projectile->setShieldDamage(this->getShieldDamage() * this->charges_); 77 projectile->setHealthDamage(this->getHealthDamage() * this->charges_); 78 this->charges_ = 0; 80 79 } 81 80 } -
code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h
r11175 r11185 21 21 * 22 22 * Author: 23 * Martin Polak23 * God of everything 24 24 * Co-authors: 25 * ...25 * 26 26 * 27 27 */ … … 58 58 59 59 private: 60 //bool chargeable_; // An indicator that this weapon type is chargeable.61 int charges_;62 60 float speed_; // The speed of the fired projectile. 63 float ctime_; // time the weapon has charged.61 64 62 }; 65 63 } -
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.cc
r11175 r11185 64 64 this->bParallelReload_ = true; 65 65 this->chargeable_ = false; 66 this->charges_ = 0; 67 this->maxCharges_ = 100; 66 68 67 69 this->reloadTimer_.setTimer(0.0f, false, createExecutor(createFunctor(&WeaponMode::reloaded, this))); … … 172 174 bool WeaponMode::push(float* reloadTime) 173 175 { 174 orxout() << "push " << chargeable_ << endl; 176 175 177 if( this->chargeable_) 176 178 { 177 // setting up a timer for knowing how long the weapon was charged178 // and passes the value to this->cTime_179 orxout() << "if " << endl;179 if(this->charges_ < this->maxCharges_){ 180 this->charges_ += 1; 181 } 180 182 return false; 181 183 } else { 182 orxout() << "else " << endl;183 184 return fire(reloadTime); 184 185 } … … 187 188 bool WeaponMode::release(float* reloadTime) 188 189 { 189 orxout() << "release " << endl;190 190 if( this->chargeable_) 191 191 { 192 orxout() << "if " << endl;193 192 return fire(reloadTime); 194 193 }else{ 195 orxout() << "else " << endl;196 194 return false; 197 195 } -
code/branches/sagerjFS16/src/orxonox/weaponsystem/WeaponMode.h
r11175 r11185 110 110 111 111 // Fire 112 inline unsigned int getMaxCharges() 113 { return this->maxCharges_;} 114 inline unsigned int getCharges() 115 { return this->charges_;} 116 inline bool isChargeable() 117 { return this->chargeable_;} 112 118 inline void setDamage(float damage) 113 119 { this->damage_ = damage;} … … 170 176 unsigned int initialMagazines_; 171 177 unsigned int munitionPerShot_; 178 unsigned int charges_; 179 unsigned int maxCharges_; 172 180 173 181 float reloadTime_;
Note: See TracChangeset
for help on using the changeset viewer.