Feature #75 ยป 0030-Send-tile-altitude-info-to-client.patch
| client/packhand.c | ||
|---|---|---|
|
tile_changed = tile_changed || (tile_resource(ptile) != presource);
|
||
|
/* always called after setting terrain */
|
||
|
/* Always called after setting terrain */
|
||
|
tile_set_resource(ptile, presource);
|
||
|
if (tile_owner(ptile) != powner) {
|
||
| ... | ... | |
|
tile_changed = TRUE;
|
||
|
}
|
||
|
ptile->altitude = packet->altitude;
|
||
|
if (packet->placing < 0) {
|
||
|
if (ptile->placing != NULL) {
|
||
|
tile_changed = TRUE;
|
||
| common/networking/packets.def | ||
|---|---|---|
|
BV_EXTRAS extras;
|
||
|
EXTRA placing;
|
||
|
TURN place_turn; # Send finishing turn and not a counter that would change every turn
|
||
|
SINT16 altitude;
|
||
|
STRING spec_sprite[MAX_LEN_NAME];
|
||
|
STRING label[MAX_LEN_MAP_LABEL];
|
||
|
end
|
||
| server/maphand.c | ||
|---|---|---|
|
info.label[0] = '\0';
|
||
|
}
|
||
|
info.altitude = ptile->altitude;
|
||
|
send_packet_tile_info(pconn, &info);
|
||
|
} else if (pplayer != NULL && known) {
|
||
|
struct player_tile *plrtile = map_get_player_tile(ptile, pplayer);
|
||
| ... | ... | |
|
info.label[0] = '\0';
|
||
|
}
|
||
|
info.altitude = ptile->altitude;
|
||
|
send_packet_tile_info(pconn, &info);
|
||
|
} else if (send_unknown) {
|
||
|
info.known = TILE_UNKNOWN;
|
||
| ... | ... | |
|
info.label[0] = '\0';
|
||
|
info.altitude = 0;
|
||
|
send_packet_tile_info(pconn, &info);
|
||
|
}
|
||
|
}
|
||