Changeset 10659 in orxonox.OLD for branches/vs-enhencements
- Timestamp:
- May 23, 2007, 7:31:23 PM (18 years ago)
- Location:
- branches/vs-enhencements/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/vs-enhencements/src/util/hud.cc
r10516 r10659 348 348 overlayWidth = this->resX * (overlayPercentage)/(200); 349 349 else 350 overlayWidth = this->resX * 0.1;350 overlayWidth = this->resX / 10; // fixed warning! 351 351 //if (overlayWidth < 100) 352 352 //overlayWidth = 100; -
branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.cc
r10649 r10659 47 47 this->grid->setVisibility(false); 48 48 this->grid->setPulse(); 49 50 49 this->grid->setTexture( "textures/plasma.png"); 51 52 this->grid->toList(OM_ENVIRON); 50 this->grid->toList(OM_ENVIRON); 51 /* 52 this->blink = new Blink(); 53 this->grid->setParent(this); 54 this->grid->setVisibility(false); 55 this->blink->setSize(1.0 ); 56 this->blink->setPeriod(.4); 57 this->blink->setColor(10, 250, 150); 58 this->blink->loadBlinkSequence( "66678998766" ); 59 this->blink->toList(OM_ENVIRON);*/ 53 60 } 54 61 … … 61 68 { 62 69 this->grid->toList(OM_DEAD); 70 // this->blink->toList(OM_DEAD); 63 71 } 64 72 … … 69 77 this->toList(OM_ENVIRON); 70 78 this->grid->setVisibility(true); 79 // this->blink->setVisibility(true); 71 80 72 81 this->setPhysDamage(10); … … 81 90 82 91 this->grid->setVisibility(false); 92 // this->blink->setVisibility(false); 83 93 this->lifeCycle = 0.0; 84 94 this->toList(OM_NULL); … … 131 141 glAlphaFunc( GL_GEQUAL, .5); 132 142 this->grid->draw(); 143 // this->blink->draw(); 133 144 glPopMatrix(); 134 145 -
branches/vs-enhencements/src/world_entities/projectiles/plasma_pulse.h
r10648 r10659 9 9 #include "projectile.h" 10 10 #include "effects/billboard.h" 11 #include "effects/blink.h" 11 12 12 13 class Vector; … … 33 34 static FastFactory* fastFactory; 34 35 Billboard* grid; 36 // Blink* blink; 35 37 }; 36 38 -
branches/vs-enhencements/src/world_entities/space_ships/space_ship.cc
r10648 r10659 218 218 219 219 220 // this->weaponMan.addWeapon( acid0, 3, 0);221 // this->weaponMan.addWeapon( acid1, 3, 1);222 223 224 220 this->secWeaponMan.addWeapon( cannon, 0, 2); 225 // this->secWeaponMan.addWeapon( spike, 1, 3);226 // this->secWeaponMan.addWeapon( acid0, 2, 2);227 // this->secWeaponMan.addWeapon( acid1, 2, 3);228 229 221 230 222 this->weaponMan.changeWeaponConfig(3); … … 232 224 233 225 234 // curWeaponPrimary = 3;235 // curWeaponSecondary = 0;236 237 226 Playable::weaponConfigChanged(); 238 227 239 reactorOutput = 10; 240 241 weaponEnergyRegen = 10; // 10 einheiten pro Sekunde 242 engineSpeedBase = 15; 243 shieldRegen = 2; 244 228 // reactorOutput = 10; 229 setReactor(10); 230 // weaponEnergyRegen = 10; // 10 einheiten pro Sekunde 231 setWeapon(10); 232 // engineSpeedBase = 15; 233 setEngine(15); 234 // shieldRegen = 2; 235 /* 245 236 shieldEnergyShare = 0.3; 246 237 weaponEnergyShare = 0.3; 247 engineEnergyShare = 0.4; 248 238 engineEnergyShare = 0.4;*/ 239 setEnergyShare(.3,.3,.4); 240 /* 249 241 shieldCur = 100; 250 242 shieldMax = 100; 251 shieldTH = .2 * shieldMax; // shield power must be 20% before shield kicks in again 252 243 shieldTH = .2 * shieldMax; // shield power must be 20% before shield kicks in again*/ 244 setShield(100, 100, .2, 2); 245 /* 253 246 this->setHealth( 100); 254 this->setHealthMax( 100); 255 247 this->setHealthMax( 100);*/ 248 setArmor(100, 100); 249 /* 256 250 electronicCur = 50; 257 251 electronicMax = 50; 258 252 electronicRegen = 3; 259 electronicTH = .7 * electronicMax; // 30% of eDamage can be handled by the ship 260 261 262 this->loadModel("models/spaceships/fighter_redesign9.obj");253 electronicTH = .7 * electronicMax; // 30% of eDamage can be handled by the ship*/ 254 setElectronic(50, 50, .7, 3.0); 255 256 // this->loadModel("models/spaceships/fighter_redesign9.obj"); 263 257 //this->setVisibiliy(false); 264 258 265 259 bForward = bBackward = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = bFire = bSecFire = false; 266 260 267 this->setHealthMax(shieldMax);268 this->setHealth(shieldCur);261 // this->setHealthMax(shieldMax); 262 // this->setHealth(shieldCur); 269 263 270 264 this->travelNode = new PNode(); … … 405 399 // this->trailL->setTexture( "textures/engine.png"); 406 400 // 407 // this->trailR = new Trail( 5, 10, .2, this);401 // this->trailR = new ( 5, 10, .2, this); 408 402 // this->trailR->setTexture( "textures/engine.png"); 409 403 … … 437 431 438 432 State::getCamera()->setViewMode(Camera::ViewTop); 433 434 LoadParam(root, "reactor", this, SpaceShip, setReactor); 435 LoadParam(root, "shield", this, SpaceShip, setShield); 436 LoadParam(root, "armor", this, SpaceShip, setArmor); 437 LoadParam(root, "electronic", this, SpaceShip, setElectronic); 438 LoadParam(root, "engine", this, SpaceShip, setEngine); 439 LoadParam(root, "energyshare", this, SpaceShip, setEnergyShare); 440 LoadParam(root, "weapon", this, SpaceShip, setWeapon); 441 439 442 } 440 443 -
branches/vs-enhencements/src/world_entities/space_ships/space_ship.h
r10531 r10659 63 63 inline WeaponManager& getWeaponManagerSecondary() { return this->secWeaponMan; }; 64 64 65 inline void setReactor(float output) {this->reactorOutput = output; }; 66 inline void setShield(float cur, float max, float th, float regen) 67 { this->shieldCur = cur; this->shieldMax = max; this->shieldTH = th; this->shieldRegen = regen;}; 68 inline void setArmor(float cur, float max) { this->armorCur = cur; this->armorMax = max; updateHealth(); }; 69 inline void setElectronic(float cur, float max, float th, float regen) 70 { this->electronicCur = cur; this->electronicMax = max; this->electronicTH = th; this->electronicRegen = regen; }; 71 inline void setEngine( float speedBase) {this->engineSpeedBase = speedBase; }; 72 inline void setEnergyShare(float shield, float weapon, float engine) 73 { float tmp = shield + weapon + engine; if (unlikely (tmp > 1)) { tmp = 1/tmp; } 74 // dirty safty hack, prevents total share being bigger than 1!! 75 this->shieldEnergyShare = shield * tmp; 76 this->weaponEnergyShare = weapon * tmp; 77 this->engineEnergyShare = engine * tmp; }; 78 inline void setWeapon(float regen) { this->weaponEnergyRegen = regen; }; 79 80 //!< Resynchonizes armor with health in WE!! 81 inline void updateHealth() { this->setHealth(this->armorCur); this->setHealthMax(this->armorMax); }; 82 65 83 //Functions for GUI 66 84 inline float getShieldCur() { return this->shieldCur; }; //!< returns current shield value … … 86 104 virtual void movement (float dt); 87 105 88 // 106 89 107 90 108 void nextWeaponConfig(); … … 92 110 93 111 virtual void hit(float damage, WorldEntity* killer); 94 112 95 113 void setCameraDistance(float dist); 96 114 … … 147 165 148 166 float reactorOutput; //!< reactor output 149 float reactorCapacity; //!< reactor capacity167 // float reactorCapacity; //!< reactor capacity 150 168 151 169 int curWeaponPrimary; //!< current primary weapon config … … 208 226 209 227 byte oldMask; //!< used for synchronisation 210 228 /* 211 229 Trail* trail; //!< Burst trail 212 230 Trail* trailL; //!< Burst trail 213 231 Trail* trailR; //!< Burst trail 214 232 */ 215 233 216 234 };
Note: See TracChangeset
for help on using the changeset viewer.