… | |
… | |
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 | |
… | |
… | |
1068 | if (caster->contr->party == NULL) |
1061 | if (caster->contr->party == NULL) |
1069 | { |
1062 | { |
1070 | spell->remove (); |
1063 | spell->remove (); |
1071 | return success; |
1064 | return success; |
1072 | } |
1065 | } |
1073 | for (pl = first_player; pl != NULL; pl = pl->next) |
1066 | for_all_players (pl) |
1074 | if ((pl->ob->contr->party == caster->contr->party) && (on_same_map (pl->ob, caster))) |
1067 | if ((pl->ob->contr->party == caster->contr->party) && (on_same_map (pl->ob, caster))) |
1075 | { |
1068 | { |
1076 | cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg); |
1069 | cast_spell (pl->ob, caster, pl->ob->facing, spell, stringarg); |
1077 | } |
1070 | } |
1078 | spell->remove (); |
1071 | spell->remove (); |