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

CF: minor patch to attack.c




	In the throwing patch, there is a small fix to 
	use query_name in the messages concerning who killed
	who. Apparently, this messes up things for a reason
	I dont fully understand. At any rate, the messaging
	isnt important to the throwing (or any) patch. Here
	is a 'patch' to remove this messaging from attack.c
	and restore it to normal.
						-b.t.

*** attack.c.orig	Fri Sep 27 02:55:44 1996
--- attack.c	Fri Sep 27 02:55:52 1996
***************
*** 739,768 ****
  	    owner=hitter;
  
  	/* Player killed something */
  	if(owner->type==PLAYER&&(owner->level/2<op->level||op->stats.exp>1000)) {
  	    if(owner!=hitter) {
! 		(void) sprintf(buf,"You killed %s with %s.",query_name(op)
! 		   ,query_name(hitter));
  #ifdef ALLOW_SKILLS
  		old_hitter = hitter;
  		owner->exp_obj=hitter->exp_obj; 
  #endif
  	    } else
! 		(void) sprintf(buf,"You killed %s.",query_name(op));
  #ifdef SOUND_EFFECTS
  	    play_sound_map(owner->map, owner->x, owner->y, SOUND_PLAYER_KILLS);
  #endif
  	    new_draw_info(NDI_BLACK, 0,owner,buf);
  	    if(op->type == PLAYER && hitter != op)
  		 change_luck(hitter, -1);
  	}
  
  	/* Pet killed something. */
  	if(get_owner(hitter)!=NULL) {
! 	    (void) sprintf(buf,"%s killed %s with %s.",hitter->owner->name,
! 		query_name(op),query_name(hitter));
  #ifdef ALLOW_SKILLS
  	    old_hitter = hitter;
  	    owner->exp_obj=hitter->exp_obj;
  #endif
  	    hitter=hitter->owner;
--- 739,767 ----
  	    owner=hitter;
  
  	/* Player killed something */
  	if(owner->type==PLAYER&&(owner->level/2<op->level||op->stats.exp>1000)) {
  	    if(owner!=hitter) {
! 		(void) sprintf(buf,"You killed %s with %s.",op->name,hitter->name);
  #ifdef ALLOW_SKILLS
  		old_hitter = hitter;
  		owner->exp_obj=hitter->exp_obj; 
  #endif
  	    } else
! 		(void) sprintf(buf,"You killed %s.",op->name);
  #ifdef SOUND_EFFECTS
  	    play_sound_map(owner->map, owner->x, owner->y, SOUND_PLAYER_KILLS);
  #endif
  	    new_draw_info(NDI_BLACK, 0,owner,buf);
  	    if(op->type == PLAYER && hitter != op)
  		 change_luck(hitter, -1);
  	}
  
  	/* Pet killed something. */
  	if(get_owner(hitter)!=NULL) {
! 	    (void) sprintf(buf,"%s killed %s with %s.",hitter->owner->name,op->name,
! 		hitter->name);
  #ifdef ALLOW_SKILLS
  	    old_hitter = hitter;
  	    owner->exp_obj=hitter->exp_obj;
  #endif
  	    hitter=hitter->owner;
***************
*** 1184,1200 ****
      owner=get_owner(hitter);
      if(owner==NULL)
        owner=hitter;
      if(owner->type==PLAYER&&(owner->level/2<op->level||op->stats.exp>1000)) {
        if(owner!=hitter) { 
!         (void) sprintf(buf,"You killed %s with %s.",query_name(op),query_name(hitter));
  #ifdef ALLOW_SKILLS
          old_hitter = hitter;
          owner->exp_obj=hitter->exp_obj; 
  #endif
        } else
!         (void) sprintf(buf,"You killed %s.",query_name(op));
  #ifdef SOUND_EFFECTS
        play_sound_map(owner->map, owner->x, owner->y, SOUND_PLAYER_KILLS);
  #endif
        new_draw_info(NDI_BLACK, 0,owner,buf);
        if(op->type == PLAYER && hitter != op)
--- 1183,1199 ----
      owner=get_owner(hitter);
      if(owner==NULL)
        owner=hitter;
      if(owner->type==PLAYER&&(owner->level/2<op->level||op->stats.exp>1000)) {
        if(owner!=hitter) { 
!         (void) sprintf(buf,"You killed %s with %s.",op->name,hitter->name);
  #ifdef ALLOW_SKILLS
          old_hitter = hitter;
          owner->exp_obj=hitter->exp_obj; 
  #endif
        } else
!         (void) sprintf(buf,"You killed %s.",op->name);
  #ifdef SOUND_EFFECTS
        play_sound_map(owner->map, owner->x, owner->y, SOUND_PLAYER_KILLS);
  #endif
        new_draw_info(NDI_BLACK, 0,owner,buf);
        if(op->type == PLAYER && hitter != op)