Commits

Steve Streeting  committed b2cfa48

Fixed BillboardChain::getNumChainElements when tail < head

  • Participants
  • Parent commits d0651eb
  • Branches v1-7

Comments (0)

Files changed (1)

File OgreMain/src/OgreBillboardChain.cpp

 				"BillboardChain::getNumChainElements");
 		}
 		const ChainSegment& seg = mChainSegmentList[chainIndex];
-
-		return seg.tail - seg.head + 1;
+		
+		if( seg.tail < seg.head )
+		{
+			return seg.tail - seg.head + mMaxElementsPerChain + 1;
+		}
+		else
+		{
+			return seg.tail - seg.head + 1;
+		}
 	}
 	//-----------------------------------------------------------------------
 	void BillboardChain::updateBoundingBox(void) const