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

CF: patch for hiscore



The titles of top-10 players are saved in the lib/highscore.
But these are not used anywhere.
Using the following patch, we can see the title information by 
the command 'hiscore

*** server/hiscore.c.org	Sun Feb  8 14:26:18 1998
--- server/hiscore.c	Thu Feb 19 14:49:56 1998
***************
*** 143,158 ****
      static char retbuf[MAX_BUF];
  
      if(!strncmp(sc->killer,"quit",MAX_NAME))
! 	sprintf(retbuf,"%3d %10ld %s quit the game on map %s [%d][%d][%d].",
!             sc->position,sc->exp,sc->name,sc->maplevel,sc->maxhp,sc->maxsp,
  		sc->maxgrace);
      else if(!strncmp(sc->killer,"left",MAX_NAME))
! 	sprintf(retbuf,"%3d %10ld %s left the game on map %s [%d][%d][%d].",
!             sc->position,sc->exp,sc->name,sc->maplevel,sc->maxhp,sc->maxsp,
  		sc->maxgrace);
      else
! 	sprintf(retbuf,"%3d %10ld %s was killed by %s on map %s [%d][%d][%d].",
!             sc->position,sc->exp,sc->name,sc->killer,sc->maplevel,
              sc->maxhp,sc->maxsp,sc->maxgrace);
      return retbuf;
  }
--- 143,158 ----
      static char retbuf[MAX_BUF];
  
      if(!strncmp(sc->killer,"quit",MAX_NAME))
! 	sprintf(retbuf,"%3d %10ld %s the %s quit the game on map %s [%d][%d][%d].",
!             sc->position,sc->exp,sc->name,sc->title,sc->maplevel,sc->maxhp,sc->maxsp,
  		sc->maxgrace);
      else if(!strncmp(sc->killer,"left",MAX_NAME))
! 	sprintf(retbuf,"%3d %10ld %s the %s left the game on map %s [%d][%d][%d].",
!             sc->position,sc->exp,sc->name,sc->title,sc->maplevel,sc->maxhp,sc->maxsp,
  		sc->maxgrace);
      else
! 	sprintf(retbuf,"%3d %10ld %s the %s was killed by %s on map %s [%d][%d][%d].",
!             sc->position,sc->exp,sc->name,sc->title,sc->killer,sc->maplevel,
              sc->maxhp,sc->maxsp,sc->maxgrace);
      return retbuf;
  }

[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]