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

Comparing deliantra/server/server/spell_util.C (file contents):
Revision 1.25 by elmex, Wed Dec 20 11:20:50 2006 UTC vs.
Revision 1.26 by root, Thu Dec 21 01:33:50 2006 UTC

694 y = op->y + freearr_y[dir]; 694 y = op->y + freearr_y[dir];
695 695
696 mflags = get_map_flags (m, &m, x, y, &x, &y); 696 mflags = get_map_flags (m, &m, x, y, &x, &y);
697 697
698 if (mflags & P_OUT_OF_MAP) 698 if (mflags & P_OUT_OF_MAP)
699 tmp = NULL; 699 tmp = 0;
700 else 700 else
701 { 701 tmp = m->at (x, y).player ();
702 for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above)
703 if (tmp->type == PLAYER)
704 break;
705 }
706 } 702 }
703
707 /* didn't find a player there, look in current square for a player */ 704 /* didn't find a player there, look in current square for a player */
708 if (tmp == NULL) 705 if (!tmp)
709 for (tmp = GET_MAP_OB (op->map, op->x, op->y); tmp != NULL; tmp = tmp->above) 706 tmp = op->ms ().player ();
710 {
711 if (tmp->type == PLAYER)
712 break;
713 }
714 707
715 return tmp; 708 return tmp;
716} 709}
717 710
718 711

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines