ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/random_maps/treasure.c
(Generate patch)

Comparing deliantra/server/random_maps/treasure.c (file contents):
Revision 1.2 by root, Sat Feb 25 23:03:47 2006 UTC vs.
Revision 1.3 by root, Sat Mar 4 19:29:03 2006 UTC

1/* 1/*
2 * static char *rcsid_treasure_c = 2 * static char *rcsid_treasure_c =
3 * "$Id: treasure.c,v 1.2 2006/02/25 23:03:47 root Exp $"; 3 * "$Id: treasure.c,v 1.3 2006/03/04 19:29:03 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
250 250
251/* finds the closest monster and returns him, regardless of doors 251/* finds the closest monster and returns him, regardless of doors
252 or walls */ 252 or walls */
253object *find_closest_monster(mapstruct *map,int x,int y,RMParms *RP) { 253object *find_closest_monster(mapstruct *map,int x,int y,RMParms *RP) {
254 int i; 254 int i;
255 for(i=0;i<SIZEOFFREE1;i++) { 255 for(i=0;i<SIZEOFFREE;i++) {
256 int lx,ly; 256 int lx,ly;
257 lx=x+freearr_x[i]; 257 lx=x+freearr_x[i];
258 ly=y+freearr_y[i]; 258 ly=y+freearr_y[i];
259 /* boundscheck */ 259 /* boundscheck */
260 if(lx > 0 && ly > 0 && lx < RP->Xsize && ly < RP->Ysize) 260 if(lx > 0 && ly > 0 && lx < RP->Xsize && ly < RP->Ysize)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines