Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: apply.c : skill tool problem




	Hey all,

	I found this problem in the apply code: when a skill
	tool was being explicitly applied, the skill assoicated
	with the skill was'nt getting selected as the new 
	chosen skill for the player.

	This caused problems down the line in other fctns..
	here is a short patch to apply.c 

		
					-b.t.

*** apply.c.orig	Sun Apr 21 01:07:37 1996
--- apply.c	Wed Jun  5 13:45:30 1996
***************
*** 2008,2018 ****
          who->contr->shoottype=range_none;
          who->contr->last_value = -1;
        }  
        CLEAR_FLAG(who, FLAG_READY_SKILL);
        who->chosen_skill=NULL;
!       sprintf(buf,"You stop using the %s.",query_name(op));
        break;
  #endif
      case ARMOUR:
      case HELMET:
      case SHIELD:
--- 2019,2029 ----
          who->contr->shoottype=range_none;
          who->contr->last_value = -1;
        }  
        CLEAR_FLAG(who, FLAG_READY_SKILL);
        who->chosen_skill=NULL;
!       /* sprintf(buf,"You stop using the %s.",query_name(op)); */ 
        break;
  #endif
      case ARMOUR:
      case HELMET:
      case SHIELD:
***************
*** 2196,2206 ****
        new_draw_info(NDI_UNIQUE, 0,who,buf);
        if(tmp!=NULL)
          (void) insert_ob_in_ob(tmp,who);
        return 1;
      }
!     sprintf(buf,"You apply %s.",query_name(op));
      SET_FLAG(who, FLAG_READY_SKILL);
      break;
  #endif
  
  /* For new skills/exp system- must have 'missile weapons' skill in order to
--- 2207,2218 ----
        new_draw_info(NDI_UNIQUE, 0,who,buf);
        if(tmp!=NULL)
          (void) insert_ob_in_ob(tmp,who);
        return 1;
      }
!     sprintf(buf,"You ready %s.",query_name(op));
!     who->chosen_skill=op;
      SET_FLAG(who, FLAG_READY_SKILL);
      break;
  #endif
  
  /* For new skills/exp system- must have 'missile weapons' skill in order to