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

Comparing deliantra/server/common/map.c (file contents):
Revision 1.8 by root, Mon Mar 20 23:07:50 2006 UTC vs.
Revision 1.9 by root, Tue Mar 28 06:54:31 2006 UTC

1/* 1/*
2 * static char *rcsid_map_c = 2 * static char *rcsid_map_c =
3 * "$Id: map.c,v 1.8 2006/03/20 23:07:50 root Exp $"; 3 * "$Id: map.c,v 1.9 2006/03/28 06:54:31 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
590 * and we only save the head of multi part objects - this is needed 590 * and we only save the head of multi part objects - this is needed
591 * in order to do map tiling properly. 591 * in order to do map tiling properly.
592 */ 592 */
593void save_objects (mapstruct *m, FILE *fp, FILE *fp2, int flag) { 593void save_objects (mapstruct *m, FILE *fp, FILE *fp2, int flag) {
594 int i, j = 0,unique=0; 594 int i, j = 0,unique=0;
595 object *op, *otmp; 595 object *op;
596 /* first pass - save one-part objects */ 596 /* first pass - save one-part objects */
597 for(i = 0; i < MAP_WIDTH(m); i++) 597 for(i = 0; i < MAP_WIDTH(m); i++)
598 for (j = 0; j < MAP_HEIGHT(m); j++) { 598 for (j = 0; j < MAP_HEIGHT(m); j++) {
599 unique=0; 599 unique=0;
600 for(op = get_map_ob (m, i, j); op; op = otmp) { 600 for(op = get_map_ob (m, i, j); op; op = op->above) {
601 otmp = op->above;
602
603 if (QUERY_FLAG(op,FLAG_IS_FLOOR) && QUERY_FLAG(op, FLAG_UNIQUE)) 601 if (QUERY_FLAG(op,FLAG_IS_FLOOR) && QUERY_FLAG(op, FLAG_UNIQUE))
604 unique=1; 602 unique=1;
605 603
606 if(op->type == PLAYER) { 604 if(op->type == PLAYER) {
607 LOG(llevDebug, "Player on map that is being saved\n"); 605 LOG(llevDebug, "Player on map that is being saved\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines