- Exhumed: fixed wall scrollers.

This commit is contained in:
Christoph Oelckers 2021-01-14 23:55:45 +01:00
parent 91f8df48c6
commit c342594691
2 changed files with 6 additions and 4 deletions

View file

@ -94,6 +94,8 @@ struct walltype
int xpan() const { return int(xpan_); }
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 addypan(float add) { ypan_ = fmod(ypan_ + add + 512, 256); } // +512 is for handling negative offsets

View file

@ -745,8 +745,8 @@ void DoFlows()
{
short nWall = sFlowInfo[i].objindex;
wall[nWall].addxpan(sFlowInfo[i].xdelta / 16384.f);
wall[nWall].addypan(sFlowInfo[i].ydelta / 16384.f);
wall[nWall].setxpan(sFlowInfo[i].xdelta / 16384.f);
wall[nWall].setypan(sFlowInfo[i].ydelta / 16384.f);
if (sFlowInfo[i].xdelta < 0)
{
@ -765,8 +765,8 @@ void DoFlows()
{
short nWall = sFlowInfo[i].objindex;
wall[nWall].addxpan(sFlowInfo[i].xdelta / 16384.f);
wall[nWall].addypan(sFlowInfo[i].ydelta / 16384.f);
wall[nWall].setxpan(sFlowInfo[i].xdelta / 16384.f);
wall[nWall].setypan(sFlowInfo[i].ydelta / 16384.f);
if (sFlowInfo[i].xdelta >= sFlowInfo[i].xacc)
{