Skip to content
Snippets Groups Projects
Commit 53bfe16a authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix particle assert

parent 0420444e
No related branches found
No related tags found
No related merge requests found
...@@ -137,30 +137,31 @@ S32 LLVOPartGroup::findAvailableVBSlot() ...@@ -137,30 +137,31 @@ S32 LLVOPartGroup::findAvailableVBSlot()
S32 ret = *sVBSlotCursor; S32 ret = *sVBSlotCursor;
sVBSlotCursor++; sVBSlotCursor++;
return ret; return ret;
} }
bool ll_is_part_idx_allocated(S32 idx, S32* start, S32* end) bool ll_is_part_idx_allocated(S32 idx, S32* start, S32* end)
{ {
/*while (start < end) while (start < end)
{ {
if (*start == idx) if (*start == idx)
{ //not allocated (in free list) { //not allocated (in free list)
return false; return false;
} }
++start; ++start;
}*/ }
//allocated (not in free list) //allocated (not in free list)
return false; return true;
} }
//static //static
void LLVOPartGroup::freeVBSlot(S32 idx) void LLVOPartGroup::freeVBSlot(S32 idx)
{ {
llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0); llassert(idx < LL_MAX_PARTICLE_COUNT && idx >= 0);
//llassert(sVBSlotCursor > sVBSlotFree); llassert(sVBSlotCursor > sVBSlotFree);
//llassert(ll_is_part_idx_allocated(idx, sVBSlotCursor, sVBSlotFree+LL_MAX_PARTICLE_COUNT)); llassert(ll_is_part_idx_allocated(idx, sVBSlotCursor, sVBSlotFree+LL_MAX_PARTICLE_COUNT));
if (sVBSlotCursor > sVBSlotFree) if (sVBSlotCursor > sVBSlotFree)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment