[Freeciv-Dev] [PATCH] use map_set_special, map_clear_special (PR#1312)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Use map_set_special and map_clear_special instead of changing values directly.
diff -ur -X freeciv/diff_ignore freeciv/server/mapgen.c
freeciv-special/server/mapgen.c
--- freeciv/server/mapgen.c Tue Mar 5 12:56:15 2002
+++ freeciv-special/server/mapgen.c Sun Mar 10 18:05:10 2002
@@ -1395,7 +1395,7 @@
) {
if (!is_hut_close(x,y)) {
number--;
- map_get_tile(x,y)->special|=S_HUT;
+ map_set_special(x, y, S_HUT);
/* Don't add to islands[].goodies because islands[] not
setup at this point, except for generator>1, but they
have pre-set starters anyway. */
@@ -1416,10 +1416,10 @@
if (!is_special_close(x,y)) {
if (tile_types[ttype].special_1_name[0] != '\0' &&
(tile_types[ttype].special_2_name[0] == '\0' ||
(myrand(100)<50))) {
- map_get_tile(x,y)->special|=S_SPECIAL_1;
+ map_set_special(x, y, S_SPECIAL_1);
}
else if (tile_types[ttype].special_2_name[0] != '\0') {
- map_get_tile(x,y)->special|=S_SPECIAL_2;
+ map_set_special(x, y, S_SPECIAL_2);
}
}
}
diff -ur -X freeciv/diff_ignore freeciv/server/unittools.c
freeciv-special/server/unittools.c
--- freeciv/server/unittools.c Thu Mar 7 07:24:34 2002
+++ freeciv-special/server/unittools.c Sun Mar 10 18:05:10 2002
@@ -2418,7 +2418,7 @@
return ok;
}
- map_get_tile(punit->x, punit->y)->special^=S_HUT;
+ map_clear_special(punit->x, punit->y, S_HUT);
send_tile_info(NULL, punit->x, punit->y);
if (game.rgame.hut_overflight==OVERFLIGHT_FRIGHTEN && is_air_unit(punit)) {
--
//Markus
- [Freeciv-Dev] [PATCH] use map_set_special, map_clear_special (PR#1312),
Markus Linnala <=
|
|