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

CF: minor bug fix




	The new use of the changing flag screws up
	the throwing code. Basically, it winds up
	producing 2 copys of an object if you throw
	an is_changing object (BAD!). The fix is 
	easy, and included below.

					-b.t.

*** ../../tarfiles/crossfire-0.92.6/server/skills.c	Thu Sep 19 06:26:39 1996
--- ./skills.c	Mon Sep 30 04:52:27 1996
***************
*** 42,51 ****
--- 42,53 ----
  #include <living.h>
  #include <skills.h>
  #include <spells.h>
  #include <book.h>
  
+ #define DEBUG_THROW
+ 
  /* 
   * When stealing: dependent on the intelligence/wisdom of whom you're
   * stealing from (op in attempt_steal), offset by your dexterity and
   * skill at stealing. They may notice your attempt, whether successful
   * or not. 
***************
*** 1144,1153 ****
--- 1146,1156 ----
  
    if(orig) {
      toss_item=get_object();
      copy_object(orig,toss_item);
      toss_item->type = THROWN_OBJ;
+     if(QUERY_FLAG(toss_item,FLAG_CHANGING)) CLEAR_FLAG(toss_item,FLAG_CHANGING);
      toss_item->stats.dam = 0; /* default damage */
  #ifdef DEBUG_THROW
      LOG(llevDebug," inserting %s(%d) in toss_item(%d)\n",
          orig->name,orig->count,toss_item->count);
  #endif