ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/apply.C
(Generate patch)

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.57 by root, Sun Dec 31 21:02:05 2006 UTC vs.
Revision 1.59 by pippijn, Sat Jan 6 14:42:30 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
3 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
4 Copyright (C) 2001 Mark Wedel & Crossfire Development Team 5 Copyright (C) 2001 Mark Wedel & Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
2433#if 0 //TODO 2434#if 0 //TODO
2434 if (!has_been_loaded (EXIT_PATH (exit)) && exit->race) 2435 if (!has_been_loaded (EXIT_PATH (exit)) && exit->race)
2435 return 0; /* This is a reset town portal */ 2436 return 0; /* This is a reset town portal */
2436#endif 2437#endif
2437 2438
2438 maptile *exitmap = maptile::load_map_sync (EXIT_PATH (exit), exit->map); 2439 maptile *exitmap = maptile::find_sync (EXIT_PATH (exit), exit->map);
2439
2440 object *tmp;
2441 object *exit_owner;
2442 2440
2443 if (exitmap) 2441 if (exitmap)
2444 { 2442 {
2443 exitmap->load_sync ();
2444
2445 tmp = GET_MAP_OB (exitmap, EXIT_X (exit), EXIT_Y (exit)); 2445 object *tmp = exitmap->at (EXIT_X (exit), EXIT_Y (exit)).bot;
2446 2446
2447 if (!tmp) 2447 if (!tmp)
2448 return 0; 2448 return 0;
2449 2449
2450 for ((tmp = GET_MAP_OB (exitmap, EXIT_X (exit), EXIT_Y (exit))); tmp; tmp = tmp->above) 2450 for (; tmp; tmp = tmp->above)
2451 { 2451 {
2452 if (tmp->type != EXIT) 2452 if (tmp->type != EXIT)
2453 continue; /*Not an exit */ 2453 continue; /*Not an exit */
2454 2454
2455 if (!EXIT_PATH (tmp)) 2455 if (!EXIT_PATH (tmp))
2466 * town portals to prevent strangers from visiting your appartments 2466 * town portals to prevent strangers from visiting your appartments
2467 */ 2467 */
2468 if (!exit->race) 2468 if (!exit->race)
2469 return 1; /*No owner, free for all! */ 2469 return 1; /*No owner, free for all! */
2470 2470
2471 exit_owner = NULL; 2471 object *exit_owner = 0;
2472 2472
2473 for_all_players (pp) 2473 for_all_players (pp)
2474 { 2474 {
2475 if (!pp->ob) 2475 if (!pp->ob)
2476 continue; 2476 continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines