Crash on ClearMeshes()

Tsynique

Addon Developer
Addon Developer
Joined
Jun 6, 2008
Messages
12
Reaction score
0
Points
0
Good day.

I have encountered a serious problem I cannot comprehend. My vessels initial visuals are loaded with AddMesh() function calls (5 meshes). During runtime the vessel has to load another mesh and after some time another one. However they are the same mesh file but must be at different vessel locations.

So, I load the first five meshes at startup. After some time I load the first additional mesh. All goes fine until press the I press the key that triggers the destruction of all previous meshes and attempts to load the second additional mesh along with the five initial meshes. What goes wrong is that I get a crash to desktop right before ClearMeshes() is executed. I have already debugged the case and I am certainly confident that it is ClearMeshes() to blame because if I comment it nothing bad happens except I see too many meshes on the screen.

Any help would be appreciated.

P.S. All the meshes are assign to its own animation. No parent/child animations, just plain linear ones.
P.S.S. I used AddMesh(char, VECTOR3) version all the time.
 
I remember a similar problem, but I don't know how I fixed it. I only remember that ClearMeshes was only the point where the module crashed, but not the cause.
 
May be you can try InsertMesh(MESHHANDLE, UINT index, _VECTOR3 *ofs=0) or
InsertMesh(const char *meshname,, UINT index, _VECTOR3 *ofs=0) and
DelMesh(UINT index, bool retain_anim=false), the problem may be related to a mesh in particular.

I prefer using meshes with index assigned, it is less confusing.
 
*sigh* Can an admin remove the spammer bot?
 
Back
Top