Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 11, 2018, 6:04:01 PM (6 years ago)
Author:
landauf
Message:

[AsteroidMining_HS17] fixed a bunch of compile- and run-time errors due to illegal usage of arrays

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc

    r11667 r11732  
    100100        int segmentCount = round(this->count / this->segments);
    101101
    102         SpicedAsteroidField* af[this->segments];
    103         (void)af[0]; // avoid nasty compiler warning
    104 
    105102        float dPhi = (2 * myPi) / this->segments;
    106103        float dTheta = 4.0*this->tiltBy/this->segments;
     
    117114           
    118115            Vector3* pos = new Vector3(radius*cos(sepp)*sin(globi), radius*sin(sepp)*sin(globi), radius*cos(globi));
    119             af[s] = new SpicedAsteroidField(this->context, this->position + *pos, this->minSize, this->maxSize, width, segmentCount, this->foggy, this->mDensity, this->fogDensity);
     116            new SpicedAsteroidField(this->context, this->position + *pos, this->minSize, this->maxSize, width, segmentCount, this->foggy, this->mDensity, this->fogDensity);
    120117           
    121118        }
Note: See TracChangeset for help on using the changeset viewer.