Fixed both RenderAllExcept behaviours

This commit is contained in:
MachineMuse 2013-06-29 23:24:03 -06:00
parent 0f25e6ec6b
commit ca011729d3
1 changed files with 20 additions and 8 deletions

View File

@ -232,31 +232,43 @@ public class WavefrontObject implements IModelCustom
public void renderAllExcept(String... excludedGroupNames) public void renderAllExcept(String... excludedGroupNames)
{ {
boolean exclude;
for (GroupObject groupObject : groupObjects) for (GroupObject groupObject : groupObjects)
{ {
exclude=false;
for (String excludedGroupName : excludedGroupNames) for (String excludedGroupName : excludedGroupNames)
{ {
if (!excludedGroupName.equalsIgnoreCase(groupObject.name)) if (excludedGroupName.equalsIgnoreCase(groupObject.name))
{
exclude=true;
}
}
if(!exclude)
{ {
groupObject.render(); groupObject.render();
} }
} }
} }
}
public void tessellateAllExcept(Tessellator tessellator, String... excludedGroupNames) public void tessellateAllExcept(Tessellator tessellator, String... excludedGroupNames)
{ {
boolean exclude;
for (GroupObject groupObject : groupObjects) for (GroupObject groupObject : groupObjects)
{ {
exclude=false;
for (String excludedGroupName : excludedGroupNames) for (String excludedGroupName : excludedGroupNames)
{ {
if (!excludedGroupName.equalsIgnoreCase(groupObject.name)) if (excludedGroupName.equalsIgnoreCase(groupObject.name))
{
exclude=true;
}
}
if(!exclude)
{ {
groupObject.render(tessellator); groupObject.render(tessellator);
} }
} }
} }
}
private Vertex parseVertex(String line, int lineCount) throws ModelFormatException private Vertex parseVertex(String line, int lineCount) throws ModelFormatException
{ {