Frederic Bouvier:

Fix a memory leak, and brownian animation, if not motion.

I have 2 new files : personality.[ch]xx . They store the personality
data that would be deleted when the object is destroyed, instead
of staying in the animation maps. I also manage the current animation
step better and the towers are not flashing randomly now.
Makefile.am is updated.
This commit is contained in:
curt
2004-05-10 14:59:02 +00:00
parent 11a74f7a31
commit 2866d1ace9
7 changed files with 156 additions and 40 deletions
+2 -5
View File
@@ -5,6 +5,7 @@
#include "model.hxx"
#include "animation.hxx"
#include "personality.hxx"
#include "modellib.hxx"
@@ -61,15 +62,11 @@ SGModelLib::flush1()
}
}
struct SGPersonalityBranch : public ssgBranch {
ssgBranch *_old_current;
};
static int
personality_pretrav_callback(ssgEntity * entity, int mask)
{
((SGPersonalityBranch *)entity)->_old_current = SGAnimation::current_object;
SGAnimation::current_object = (ssgBranch *)entity;
SGAnimation::current_object = (SGPersonalityBranch *)entity;
return 1;
}