Skip to content

Commit

Permalink
- fixed dofurniture
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Feb 15, 2022
1 parent 651c25a commit c18a46b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source/games/duke/src/sectors_r.cpp
Expand Up @@ -2763,7 +2763,7 @@ void dofurniture(walltype* wlwal, sectortype* sectp, int snum)
if (movestep == 0) movestep = 4 * maptoworld;

double max_x = INT32_MIN, max_y = INT32_MIN, min_x = INT32_MAX, min_y = INT32_MAX;
for (auto& wal : wallsofsector(sectp))
for (auto& wal : wallsofsector(nextsect))
{
double x = wal.pos.X;
double y = wal.pos.Y;
Expand Down Expand Up @@ -2835,25 +2835,26 @@ void dofurniture(walltype* wlwal, sectortype* sectp, int snum)
}
else
{
movestep -= 2 * maptoworld;
for(auto& wal : wallsofsector(nextsect))
{
auto vec = wal.pos;
switch (wlwal->lotag)
{
case 42:
vec.Y -= movestep - 2;
vec.Y -= movestep;
dragpoint(&wal, vec);
break;
case 41:
vec.X += movestep - 2;
vec.X += movestep;
dragpoint(&wal, vec);
break;
case 40:
vec.Y += movestep - 2;
vec.Y += movestep;
dragpoint(&wal, vec);
break;
case 43:
vec.X -= movestep - 2;
vec.X -= movestep;
dragpoint(&wal, vec);
break;
}
Expand Down

0 comments on commit c18a46b

Please sign in to comment.