Skip to content

Commit

Permalink
Fix set texture offset in 3d floors sides.
Browse files Browse the repository at this point in the history
  • Loading branch information
crisisinaptica committed Dec 1, 2018
1 parent c61db53 commit 02a129a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/MapEditor/Edit/Edit3D.cpp
Expand Up @@ -212,15 +212,16 @@ void Edit3D::changeOffset(int amount, bool x) const
bool changed = false;
for (unsigned a = 0; a < items.size(); a++)
{
int index = items[a].real_index >= 0 ? items[a].real_index : items[a].index;
// Wall
if (items[a].type >= ItemType::WallTop && items[a].type <= ItemType::WallBottom)
{
MapSide* side = context_.map().side(items[a].index);
MapSide* side = context_.map().side(index);
// If offsets are linked, just change the whole side offset
if (link_offset_)
{
// Check we haven't processed this side already
if (VECTOR_EXISTS(done, items[a].index))
if (VECTOR_EXISTS(done, index))
continue;

// Change the appropriate offset
Expand All @@ -236,7 +237,7 @@ void Edit3D::changeOffset(int amount, bool x) const
}

// Add to done list
done.push_back(items[a].index);
done.push_back(index);
}

// Unlinked offsets
Expand Down

0 comments on commit 02a129a

Please sign in to comment.