Skip to content

Commit

Permalink
Fixed some traps not rendering in dungeons saved with the in-game editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Marukyu committed Oct 14, 2016
1 parent 5a8e783 commit 57e9435
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Client/LevelRenderer/ObjectAppearance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ std::vector<sf::Vertex> ObjectAppearanceManager::getObjectVertices(const Object&
return vertices;
}

// The in-game editor gives some objects a subtype of -1 to indicate that the property is unused.
// This workaround allows traps to remain visible in NecroEdit even after saving dungeons with them in-game.
variant = std::max(0, variant);

try
{
spriteData.nodeID = it->second.nodeIDs.at(variant);
Expand Down

0 comments on commit 57e9435

Please sign in to comment.