Changeset 11667 for code/branches/AsteroidMining_HS17/src/modules/asteroidmining/SpicedAsteroidField.cc
- Timestamp:
- Dec 12, 2017, 8:29:52 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AsteroidMining_HS17/src/modules/asteroidmining/SpicedAsteroidField.cc
r11664 r11667 29 29 /** 30 30 31 @file SpicedAsteroidField.cc 31 @file 32 @author remartin 32 33 @brief Asteroid field with lots of parameters. Derived from asteroidField.lua 33 34 34 35 Generates a bunch of asteroids that may contain some stuff. 36 It is required to wait until all XML-arguments are set. That's why the actual 37 generation happens when tick() gets called for the first time. 38 35 39 */ 36 40 … … 105 109 Vector3* relPos; 106 110 107 108 111 for(int gertrud = 0; gertrud<count; ++gertrud){ 109 112 … … 111 114 112 115 size = round(rnd()*(this->maxSize - this->minSize)) + this->minSize; 113 a->setSize(size); 116 a->setSize(size); 117 114 118 pX = round(rnd()*2*this->radius) - radius; 115 119 pY = round(rnd()*2*this->radius) - radius; … … 118 122 a->setPosition(this->position + *relPos); 119 123 120 bool spiced = (rnd() < (this->mDensity)); // does drop pickups etc.124 bool spiced = (rnd() < (this->mDensity)); // Whether the asteroid does drop pickups etc. 121 125 a->toggleDropStuff(spiced); 122 123 // A problem124 a->setVelocity(this->getVelocity());125 126 126 // Fog is iplemented with billboards. 127 a->setVelocity(this->getVelocity()); 128 129 // Fog is iplemented with billboards (as in asteroidField.lua, that bloke had the idea) 127 130 Billboard* bb; 128 131 if(this->foggy && mod(gertrud, 5) == 0){
Note: See TracChangeset
for help on using the changeset viewer.