Changeset 11735 for code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidField.cc
- Timestamp:
- Feb 11, 2018, 7:19:57 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidField.cc
r11667 r11735 107 107 int pZ; 108 108 109 Vector3* relPos;110 111 109 for(int gertrud = 0; gertrud<count; ++gertrud){ 112 110 … … 119 117 pY = round(rnd()*2*this->radius) - radius; 120 118 pZ = round(rnd()*2*this->radius) - radius; 121 relPos = new Vector3(pX, pY, pZ);122 a->setPosition(this->position + *relPos);119 Vector3 relPos(pX, pY, pZ); 120 a->setPosition(this->position + relPos); 123 121 124 122 bool spiced = (rnd() < (this->mDensity)); // Whether the asteroid does drop pickups etc. … … 128 126 129 127 // Fog is iplemented with billboards (as in asteroidField.lua, that bloke had the idea) 130 Billboard* bb;131 128 if(this->foggy && mod(gertrud, 5) == 0){ 132 bb = new Billboard(this->context);133 bb->setPosition(this->position + *relPos);129 Billboard* bb = new Billboard(this->context); 130 bb->setPosition(this->position + relPos); 134 131 bb->setMaterial("Smoke/Smoke"); 135 132 bb->setScale(size);
Note: See TracChangeset
for help on using the changeset viewer.