--- deliantra/server/common/anim.C 2006/09/03 07:57:54 1.5 +++ deliantra/server/common/anim.C 2006/09/03 08:05:39 1.6 @@ -1,6 +1,6 @@ /* * static char *rcsid_anim_c = - * "$Id: anim.C,v 1.5 2006/09/03 07:57:54 root Exp $"; + * "$Id: anim.C,v 1.6 2006/09/03 08:05:39 root Exp $"; */ /* @@ -60,11 +60,17 @@ * Put # at start so it will be first in alphabetical * order. */ - animations[0].name = "###none"; - animations[0].num_animations=1; - animations[0].faces = (Fontindex *) malloc(sizeof(Fontindex)); - animations[0].faces[0]=0; - animations[0].facings=0; + { + Animations anim0; + + anim0.name = "###none"; + anim0.num_animations=1; + anim0.faces = (Fontindex *) malloc(sizeof(Fontindex)); + anim0.faces[0]=0; + anim0.facings=0; + + animations.push_back (anim0); + } sprintf(buf,"%s/animations", settings.datadir); LOG(llevDebug,"Reading animations from %s...", buf); @@ -83,10 +89,11 @@ } num_animations++; - Animations &anim = animations.at (num_animations); + Animations anim; anim.name = buf + 5; anim.num = num_animations; /* for bsearch */ anim.facings = 1; + animations.push_back (anim); } else if (!strncmp(buf,"mina",4)) { animations[num_animations].faces = (Fontindex *) malloc(sizeof(Fontindex)*num_frames);