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

Comparing deliantra/server/server/c_wiz.C (file contents):
Revision 1.84 by root, Thu Apr 15 02:51:39 2010 UTC vs.
Revision 1.85 by root, Thu May 13 12:28:13 2010 UTC

452 452
453 pl = get_other_player_from_name (op, params); 453 pl = get_other_player_from_name (op, params);
454 if (!pl) 454 if (!pl)
455 return 1; 455 return 1;
456 456
457 i = find_free_spot (op, op->map, op->x, op->y, 1, 9); 457 maptile *m = op->map;
458 sint16 nx = op->x;
459 sint16 ny = op->y;
460
461 i = find_free_spot (op, m, nx, ny, 1, SIZEOFFREE1+1);
458 if (i == -1) 462 if (i == -1)
459 { 463 {
460 new_draw_info (NDI_UNIQUE, 0, op, "Can not find a free spot to place summoned player."); 464 new_draw_info (NDI_UNIQUE, 0, op, "Can not find a free spot to place summoned player.");
461 return 1; 465 return 1;
462 } 466 }
463 467
464 pl->ob->player_goto (op->map->path, op->x + freearr_x[i], op->y + freearr_y[i]); 468 nx += freearr_x [i];
469 ny += freearr_y [i];
470
471 if (!xy_normalise (m, nx, ny))
472 {
473 new_draw_info (NDI_UNIQUE, 0, op, "Can not find a free spot to place summoned player.");
474 return 1;
475 }
476
477 pl->ob->player_goto (m->path, nx, ny);
465 new_draw_info (NDI_UNIQUE, 0, pl->ob, "You are summoned."); 478 new_draw_info (NDI_UNIQUE, 0, pl->ob, "You are summoned.");
466 new_draw_info (NDI_UNIQUE, 0, op, "OK."); 479 new_draw_info (NDI_UNIQUE, 0, op, "OK.");
467 480
468 return 1; 481 return 1;
469} 482}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines