mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 04:50:42 +00:00
- Exhumed: fixed wall scrollers.
This commit is contained in:
parent
91f8df48c6
commit
c342594691
2 changed files with 6 additions and 4 deletions
|
@ -94,6 +94,8 @@ struct walltype
|
||||||
|
|
||||||
int xpan() const { return int(xpan_); }
|
int xpan() const { return int(xpan_); }
|
||||||
int ypan() const { return int(ypan_); }
|
int ypan() const { return int(ypan_); }
|
||||||
|
void setxpan(float add) { xpan_ = fmod(add + 512, 256); } // +512 is for handling negative offsets
|
||||||
|
void setypan(float add) { ypan_ = fmod(add + 512, 256); } // +512 is for handling negative offsets
|
||||||
void addxpan(float add) { xpan_ = fmod(xpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
void addxpan(float add) { xpan_ = fmod(xpan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||||
void addypan(float add) { ypan_ = fmod(ypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
void addypan(float add) { ypan_ = fmod(ypan_ + add + 512, 256); } // +512 is for handling negative offsets
|
||||||
|
|
||||||
|
|
|
@ -745,8 +745,8 @@ void DoFlows()
|
||||||
{
|
{
|
||||||
short nWall = sFlowInfo[i].objindex;
|
short nWall = sFlowInfo[i].objindex;
|
||||||
|
|
||||||
wall[nWall].addxpan(sFlowInfo[i].xdelta / 16384.f);
|
wall[nWall].setxpan(sFlowInfo[i].xdelta / 16384.f);
|
||||||
wall[nWall].addypan(sFlowInfo[i].ydelta / 16384.f);
|
wall[nWall].setypan(sFlowInfo[i].ydelta / 16384.f);
|
||||||
|
|
||||||
if (sFlowInfo[i].xdelta < 0)
|
if (sFlowInfo[i].xdelta < 0)
|
||||||
{
|
{
|
||||||
|
@ -765,8 +765,8 @@ void DoFlows()
|
||||||
{
|
{
|
||||||
short nWall = sFlowInfo[i].objindex;
|
short nWall = sFlowInfo[i].objindex;
|
||||||
|
|
||||||
wall[nWall].addxpan(sFlowInfo[i].xdelta / 16384.f);
|
wall[nWall].setxpan(sFlowInfo[i].xdelta / 16384.f);
|
||||||
wall[nWall].addypan(sFlowInfo[i].ydelta / 16384.f);
|
wall[nWall].setypan(sFlowInfo[i].ydelta / 16384.f);
|
||||||
|
|
||||||
if (sFlowInfo[i].xdelta >= sFlowInfo[i].xacc)
|
if (sFlowInfo[i].xdelta >= sFlowInfo[i].xacc)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue