Tried to apply the following change, from the cryptic clues given:
Tried to apply the following change, from the cryptic clues given:

---------------------
Hi,

Trimesh-Box collision again doesn't respect contacts count (can overwrite
past the end of supplied array). I've written a bugfix before, but after
that the collision routine was changed, making the previous fix ineffective.
The previous fix tested contacts count in each loop over touched faces
iteration, but now in a single iteration several contacts can be generated.

So, changes to collision_trimesh_box.cpp, dCollideBTL():

around line 410, at start of "for (int i = 0; i < TriCount; i++)" loop:
comment out whole "if (OutTriCount == (Flags & 0xffff))" test.

after each call to GenerateContacts, add this (nasty goto's!):
    if( OutTriCount == (Flags & 0xffff) )
        goto _fullContacts;
the calls are in two places inside main "over faces" loop.

after main "over faces" loop, and before the final small "over contacts"
loop, add label:
    _fullContacts:


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/


forrestv/opende,forrestv/opende,forrestv/opende,forrestv/opende,forrestv/opende