greetings

yes, now i'm working now on compounds, but have some problems there...

okay, what about destructor.. i made some tests and must to say that you are right, engine craches if i remove entity
after several tests, i change code to this:

here is new destructor
Code:
void onsetdestructor(NewtonBody *body)
{
	ENTITY *entity = (ENTITY*)NewtonBodyGetUserData(body);
	if (entity) {ent_remove(entity);}
}


here is a process of destruction
Code:
if (key_x)
{
if (my.skill99!=0) {NewtonDestroyBody(nworld,(NewtonBody*) my.skill99);}
}


i think, its the best and simplest way: graphical entity is removed in destructor of newtons body, so we just may delete only NewtonBody
destructor would be changed in v.9

why dont you download the last versions: i added only new levels, but the core of wrapper is unchanged(till now :))

anyway, thanks for gelp in debuging wink

Last edited by VeT; 08/30/08 14:21.

1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro