Assets/Deps/emotitron/Network/NST/NSTFrameBuffer.cs
/// <summary>
/// Determine the difference in count between two packet counts - accounting for the range being 1-X
/// </summary>
/// <returns> </returns>
Determine the difference in count between two packet counts - accounting for the range being 1-X
Determine the difference in count between two packet counts - accounting for the range being 1 - X
public int CountFrames(int firstIndex, int secondIndex)
		{
			if (secondIndex == 0 || firstIndex == 0)
				return 1;
			if (secondIndex < firstIndex)
				secondIndex += (frames.Length - 1); 
			int numOfIndexes = secondIndex - firstIndex;
			return numOfIndexes;
		}
public int CountFrames ( int firstIndex , int secondIndex ) { if ( secondIndex == 0 || firstIndex == 0 ) return 1 ; if ( secondIndex < firstIndex ) secondIndex += ( frames . Length - 1 ) ; int numOfIndexes = secondIndex - firstIndex ; return numOfIndexes ; }
Determine the difference in count between two packet counts - accounting for the range being 1-X
Determine the difference in count between two packet counts - accounting for the range being 1 - X
// zero packets are reserved for indicating a teleport/fire event // if the new index is lower, convert it to what it would have been had it not wrapped back around. // zero is skipped so we account for that here with the -1
None
firstIndex
int
secondIndex
int