… | |
… | |
1249 | return tile_map [dir]; |
1249 | return tile_map [dir]; |
1250 | |
1250 | |
1251 | if (tile_path [dir]) |
1251 | if (tile_path [dir]) |
1252 | { |
1252 | { |
1253 | // well, try to locate it then, if possible - maybe it's there already |
1253 | // well, try to locate it then, if possible - maybe it's there already |
|
|
1254 | // this is the ONLY place in the server that links maps with each other, |
|
|
1255 | // so any kind of inter-map stuff has to be initiated here. |
1254 | if (maptile *m = find_async (tile_path [dir], this, load)) |
1256 | if (maptile *m = find_async (tile_path [dir], this, load)) |
1255 | { |
1257 | { |
1256 | bool mismatch = false; |
1258 | bool mismatch = false; |
1257 | |
1259 | |
1258 | if (dir == TILE_NORTH || dir == TILE_SOUTH || dir == TILE_UP || dir == TILE_DOWN) |
1260 | if (dir == TILE_NORTH || dir == TILE_SOUTH || dir == TILE_UP || dir == TILE_DOWN) |
… | |
… | |
1274 | // has us as neighbour, which is very common, but not guaranteed. |
1276 | // has us as neighbour, which is very common, but not guaranteed. |
1275 | int dir2 = REVERSE_TILE_DIR (dir); |
1277 | int dir2 = REVERSE_TILE_DIR (dir); |
1276 | |
1278 | |
1277 | if (m->tile_path [dir2] == path) |
1279 | if (m->tile_path [dir2] == path) |
1278 | m->tile_map [dir2] = this; |
1280 | m->tile_map [dir2] = this; |
1279 | |
|
|
1280 | // this could be optimised endlessly |
|
|
1281 | //m->activate_physics (); |
|
|
1282 | |
1281 | |
1283 | return tile_map [dir] = m; |
1282 | return tile_map [dir] = m; |
1284 | } |
1283 | } |
1285 | } |
1284 | } |
1286 | |
1285 | |