OK, here is a VERY simplified version of what I need to do...
Code:
ENTITIY* ents[1500]
//
void ents_startup()
{
	for(i=0; i<1500; i++)
	{	
		ents[i] = ent_create(NULL, nullvector, NULL);
		ent_clone(ents[i]);
	}
}
//
void ent_randomize(ENTITY* ent)
{
	## Manipulate some vertices
	## Manipulate some skins
}
//
void ent_recreate(ENTITY* ent, STRING* new_ent)
{
	ent_morph(ent, new_ent);
	//
	ent_randomize(ent);
}




Now, my problem is this...
You can see I play with the mesh and skins in the 'ent_randomize' function.
AND I usually have multiple occurances in the level of each of the MDL files.

So, NORMALLY that means I need to do an ent_clone in "ents_startup",
and everything would be fine.


But, I am concerned that later the ent_morph will 'break' the ent_clone's changes.
So to allieviate that I would then NOT do an ent_clone in "ents_startup",
and do it after the ent_morph in "ent_recreate" instead.
That would probable do it I think.... (I really hate, but need, ent_clone)


Now for the big BUT! Here is an expected life-cycle of my entities...
Code:
...
level_load(NULL)		// start new level

ME = ent_create(NULL)		// performed by ents_startup

wait(?)				// gameplay progresses

while(1)			// entity starts getting used
{
	ent_recreate(ME)	// this WILL recurr multiple times
	wait(?)			// with an unknown period of time between
}
level_load(NULL)		//start all over again



So you can see the entities will be getting ent_morph'ed many times in their lifespan.
I am now worried this is going to cause a memory blowout due to calling
ent_clone multiple times on the same entity...


So... what Im looking for is this....

Has anyone else come across this hurdle before? How did YOU cross it??

Hell, is it even a hurdle? Would an ent_clone in "ent_startup" be all I actually need?

Does anyone know IF ent_clone gets broken by ent_morph?



FOOTNOTE::
I have been thinking about ent_clone in ents_startup and just doing a mesh-swap in ent_recreate...
But I would LIKE to avoid this if possible as it would cause me problems this post doesnt show...


Thanks muchly guys and gals...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial