Exemple #1
0
void bfree(VBVHTree *tree)
{
	if (tot_pushup + tot_pushdown + tot_hints + tot_moves) {
		if (G.debug & G_DEBUG) {
			printf("tot pushups: %d\n", tot_pushup);
			printf("tot pushdowns: %d\n", tot_pushdown);
			printf("tot moves: %d\n", tot_moves);
			printf("tot hints created: %d\n", tot_hints);
		}

		tot_pushup = 0;
		tot_pushdown = 0;
		tot_hints = 0;
		tot_moves = 0;
	}
	bvh_free(tree);
}
entity_t::~entity_t()
{
	svec_iter_t iter;
	model_t *model;
	bvh_t *anim;

	svec_iter_init(&iter, &modelv);

	while ( (model = (model_t *) svec_iter_next(&iter)) )
		model_free(model);

	svec_iter_init(&iter, &animv);

	while ( (anim = (bvh_t *) svec_iter_next(&iter)) )
		bvh_free(anim);

	svec_free(&modelv);
	svec_free(&animv);
}