mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 07:31:03 +00:00
- Duke: Partially address excessively fast sky in E4L1 as reported in #217.
* Before d545eb7aa9
, `moveclouds()` simply set `ceilingxpanning`/`ceilingypanning`. Afterwards, it was accumulating with every passing loop.
* Despite fixing this, still seems a bit fast.
This commit is contained in:
parent
51205fbdac
commit
1e8fe482f3
2 changed files with 6 additions and 2 deletions
|
@ -46,6 +46,10 @@ struct sectortype
|
|||
int ceilingypan() const { return int(ceilingypan_); }
|
||||
int floorxpan() const { return int(floorxpan_); }
|
||||
int floorypan() const { return int(floorypan_); }
|
||||
void setfloorxpan(float val) { floorxpan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setfloorypan(float val) { floorypan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setceilingxpan(float val) { ceilingxpan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void setceilingypan(float val) { ceilingypan_ = fmod(val + 512, 256); } // +512 is for handling negative offsets
|
||||
void addfloorxpan(float add) { floorxpan_ = fmod(floorxpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addfloorypan(float add) { floorypan_ = fmod(floorypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
void addceilingxpan(float add) { ceilingxpan_ = fmod(ceilingxpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||
|
|
|
@ -1261,8 +1261,8 @@ void moveclouds(double smoothratio)
|
|||
cloudy += ps[screenpeek].angle.ang.bsin(-9);
|
||||
for (int i = 0; i < numclouds; i++)
|
||||
{
|
||||
sector[clouds[i]].addceilingxpan(cloudx / 64.f);
|
||||
sector[clouds[i]].addceilingypan(cloudy / 64.f);
|
||||
sector[clouds[i]].setceilingxpan(cloudx / 64.f);
|
||||
sector[clouds[i]].setceilingypan(cloudy / 64.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue