… | |
… | |
2433 | #if 0 //TODO |
2433 | #if 0 //TODO |
2434 | if (!has_been_loaded (EXIT_PATH (exit)) && exit->race) |
2434 | if (!has_been_loaded (EXIT_PATH (exit)) && exit->race) |
2435 | return 0; /* This is a reset town portal */ |
2435 | return 0; /* This is a reset town portal */ |
2436 | #endif |
2436 | #endif |
2437 | |
2437 | |
2438 | maptile *exitmap = maptile::load_map_sync (EXIT_PATH (exit), exit->map); |
2438 | maptile *exitmap = maptile::find_sync (EXIT_PATH (exit), exit->map); |
2439 | |
|
|
2440 | object *tmp; |
|
|
2441 | object *exit_owner; |
|
|
2442 | |
2439 | |
2443 | if (exitmap) |
2440 | if (exitmap) |
2444 | { |
2441 | { |
|
|
2442 | exitmap->load_sync (); |
|
|
2443 | |
2445 | tmp = GET_MAP_OB (exitmap, EXIT_X (exit), EXIT_Y (exit)); |
2444 | object *tmp = exitmap->at (EXIT_X (exit), EXIT_Y (exit)).bot; |
2446 | |
2445 | |
2447 | if (!tmp) |
2446 | if (!tmp) |
2448 | return 0; |
2447 | return 0; |
2449 | |
2448 | |
2450 | for ((tmp = GET_MAP_OB (exitmap, EXIT_X (exit), EXIT_Y (exit))); tmp; tmp = tmp->above) |
2449 | for (; tmp; tmp = tmp->above) |
2451 | { |
2450 | { |
2452 | if (tmp->type != EXIT) |
2451 | if (tmp->type != EXIT) |
2453 | continue; /*Not an exit */ |
2452 | continue; /*Not an exit */ |
2454 | |
2453 | |
2455 | if (!EXIT_PATH (tmp)) |
2454 | if (!EXIT_PATH (tmp)) |
… | |
… | |
2466 | * town portals to prevent strangers from visiting your appartments |
2465 | * town portals to prevent strangers from visiting your appartments |
2467 | */ |
2466 | */ |
2468 | if (!exit->race) |
2467 | if (!exit->race) |
2469 | return 1; /*No owner, free for all! */ |
2468 | return 1; /*No owner, free for all! */ |
2470 | |
2469 | |
2471 | exit_owner = NULL; |
2470 | object *exit_owner = 0; |
2472 | |
2471 | |
2473 | for_all_players (pp) |
2472 | for_all_players (pp) |
2474 | { |
2473 | { |
2475 | if (!pp->ob) |
2474 | if (!pp->ob) |
2476 | continue; |
2475 | continue; |