Difference for plugins/cfanim/cfanim.c from version 1.3 to 1.4


version 1.3 version 1.4
Line 157
 
Line 157
 long int initsay (char* name, char* parameters, struct CFmovement_struct* move_entity)  long int initsay (char* name, char* parameters, struct CFmovement_struct* move_entity)
 {  {
     if (parameters)      if (parameters)
         move_entity->parameters=strdup_local (parameters);          move_entity->parameters=cf_strdup_local (parameters);
     else      else
         move_entity->parameters=NULL;          move_entity->parameters=NULL;
     printf ("CFAnim: init say: parameters: %p\n",parameters);      printf ("CFAnim: init say: parameters: %p\n",parameters);
Line 219
 
Line 219
   
 long int initdropobject (char* name, char* parameters, struct CFmovement_struct* move_entity)  long int initdropobject (char* name, char* parameters, struct CFmovement_struct* move_entity)
 {  {
     move_entity->parameters=parameters?strdup_local(parameters):NULL;      move_entity->parameters=parameters?cf_strdup_local(parameters):NULL;
     return 1;      return 1;
 }  }
 int rundropobject(struct CFanimation_struct* animation, long int id, void* parameters)  int rundropobject(struct CFanimation_struct* animation, long int id, void* parameters)
Line 346
 
Line 346
     if (mapname[0]=='\0')      if (mapname[0]=='\0')
         return 0;          return 0;
     teleport=(teleport_params*)malloc (sizeof(teleport_params));      teleport=(teleport_params*)malloc (sizeof(teleport_params));
     teleport->mapname=strdup_local (mapname);      teleport->mapname=cf_strdup_local (mapname);
     teleport->mapx=mapx;      teleport->mapx=mapx;
     teleport->mapy=mapy;      teleport->mapy=mapy;
     move_entity->parameters=teleport;      move_entity->parameters=teleport;
Line 365
 
Line 365
   
 long int initnotice (char* name, char* parameters, struct CFmovement_struct* move_entity)  long int initnotice (char* name, char* parameters, struct CFmovement_struct* move_entity)
 {  {
     move_entity->parameters=parameters?strdup_local(parameters):NULL;      move_entity->parameters=parameters?cf_strdup_local(parameters):NULL;
     return 1;      return 1;
 }  }
 int runnotice(struct CFanimation_struct* animation, long int id, void* parameters)  int runnotice(struct CFanimation_struct* animation, long int id, void* parameters)
Line 655
 
Line 655
     int     errors_found=0;      int     errors_found=0;
     CFanimation* current_anim;      CFanimation* current_anim;
   
     fichier = fopen(create_pathname(file),"r");      fichier = fopen(cf_get_maps_directory(file),"r");
     if (fichier == NULL)      if (fichier == NULL)
     {      {
         printf("CFAnim: Unable to open %s\n", create_pathname(file));          printf("CFAnim: Unable to open %s\n", cf_get_maps_directory(file));
         return 0;          return 0;
     }      }
     while (fgets(buffer,HUGE_BUF,fichier))      while (fgets(buffer,HUGE_BUF,fichier))
Line 689
 
Line 689
             {              {
                 if (*value=='"') value++;                  if (*value=='"') value++;
                 if (value[strlen(value)-1] == '"') value[strlen(value)-1]='\0';                  if (value[strlen(value)-1] == '"') value[strlen(value)-1]='\0';
                 name=strdup_local (value);                  name=cf_strdup_local (value);
             }              }
             else if (!strcmp (variable,"victimtype"))              else if (!strcmp (variable,"victimtype"))
             {              {
Line 772
 
Line 772
             }              }
             else if (!strcmp(variable,"animation"))              else if (!strcmp(variable,"animation"))
             {              {
                 animationitem=strdup_local(value);                  animationitem=cf_strdup_local(value);
             }              }
             else errors_found=1;              else errors_found=1;
         }          }
     }      }
     if (buffer[0]=='\0')      if (buffer[0]=='\0')
     {      {
         printf ("CFAnim: Errors occurred during the parsing of %s\n", create_pathname(file));          printf ("CFAnim: Errors occurred during the parsing of %s\n", cf_get_maps_directory(file));
         return 0;          return 0;
     }      }
     if (!(current_anim=create_animation()))      if (!(current_anim=create_animation()))


Legend:
line(s) removed in v.1.3 
line(s) changed
 line(s) added in v.1.4

File made using version 1.98 of cvs2html by leaf at 2011-07-21 16:58