Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 27, 2006, 3:01:54 PM (18 years ago)
Author:
stefalie
Message:

mountain_lake: some fading hacks… doesnt work at all… yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mountain_lake/src/world_entities/environments/mapped_water.cc

    r8821 r8828  
    292292 
    293293
    294 //   if(this->tempcounter == 200) {
     294//   if(this->tempcounter == 100) {
    295295//     this->resetWaterColor(1, 0, 0);
    296296//     resetShininess(1);
     
    299299//     }
    300300//   tempcounter++;
     301
     302  if(this->tempcounter == 10) {
     303    this->fadeWaterColor(1, 0, 0, 10);
     304
     305    PRINTF(0)("test waterchangecolor ");
     306    }
     307  tempcounter++;
     308
     309  if(this->newWaterColor != this->waterColor)
     310  {
     311    float time = this->colorFadeTime / dt;
     312    float x = (this->newWaterColor.x - this->waterColor.x) * time +this->waterColor.x;
     313    float y = (this->newWaterColor.y - this->waterColor.y) * time +this->waterColor.y;
     314    float z = (this->newWaterColor.z - this->waterColor.z) * time +this->waterColor.z;
     315
     316    this->colorFadeTime -= dt;
     317    this->resetWaterColor(x, y, z);
     318  }
    301319   
    302320}
Note: See TracChangeset for help on using the changeset viewer.