Difference for server/skill_util.c from version 1.46 to 1.47


version 1.46 version 1.47
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_skill_util_c =   * static char *rcsid_skill_util_c =
  *   "$Id: skill_util.c,v 1.46 2004/02/23 01:21:28 mwedel Exp $";   *   "$Id: skill_util.c,v 1.47 2004/04/08 06:48:51 mwedel Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 856
 
Line 856
  }   }
      }       }
  } else {   } else {
        /* Seen some crashes below where current_weapon is not set,
         * even though the flag says it is.  So if current weapon isn't set,
         * do some work in trying to find the object to use.
         */
        if (!op->current_weapon) {
    object *tmp;
   
    LOG(llevError,"Player %s does not have current weapon set but flag_ready_weapon is set\n",
        op->name);
    for (tmp=op->inv; tmp; tmp=tmp->below)
        if (tmp->type == WEAPON && QUERY_FLAG(tmp, FLAG_APPLIED)) break;
   
    if (op->current_weapon_script)
        FREE_AND_CLEAR_STR(op->current_weapon_script);
    if (!tmp) {
        LOG(llevError,"Could not find applied weapon on %s",
    op->name);
        op->current_weapon=NULL;
        return 0;
    } else {
        op->current_weapon = tmp;
        op->current_weapon_script=add_string(query_name(tmp));
    }
        }
   
      /* Has ready weapon - make sure chosen_skill is set up properly */       /* Has ready weapon - make sure chosen_skill is set up properly */
      if (!op->chosen_skill || op->current_weapon->skill != op->chosen_skill->skill) {       if (!op->chosen_skill || op->current_weapon->skill != op->chosen_skill->skill) {
  change_skill(op, find_skill_by_name(op, op->current_weapon->skill), 1);   change_skill(op, find_skill_by_name(op, op->current_weapon->skill), 1);


Legend:
line(s) removed in v.1.46 
line(s) changed
 line(s) added in v.1.47

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:45