#ifdef TRAVEL
case '`':
{
- if (!p_ptr->wild_mode) do_cmd_travel();
+ if (!p_ptr->wild_mode) do_cmd_travel(p_ptr);
if (p_ptr->special_defense & KATA_MUSOU)
{
set_action(p_ptr, ACTION_NONE);
* @brief トラベル処理のメインルーチン
* @return なし
*/
-void do_cmd_travel(void)
+void do_cmd_travel(player_type *creature_ptr)
{
POSITION x, y;
int i;
}
else if (!tgt_pt(&x, &y)) return;
- if ((x == p_ptr->x) && (y == p_ptr->y))
+ if ((x == creature_ptr->x) && (y == creature_ptr->y))
{
msg_print(_("すでにそこにいます!", "You are already there!!"));
return;
travel.dir = 0;
/* Decides first direction */
- dx = abs(p_ptr->x - x);
- dy = abs(p_ptr->y - y);
- sx = ((x == p_ptr->x) || (dx < dy)) ? 0 : ((x > p_ptr->x) ? 1 : -1);
- sy = ((y == p_ptr->y) || (dy < dx)) ? 0 : ((y > p_ptr->y) ? 1 : -1);
+ dx = abs(creature_ptr->x - x);
+ dy = abs(creature_ptr->y - y);
+ sx = ((x == creature_ptr->x) || (dx < dy)) ? 0 : ((x > creature_ptr->x) ? 1 : -1);
+ sy = ((y == creature_ptr->y) || (dy < dx)) ? 0 : ((y > creature_ptr->y) ? 1 : -1);
for (i = 1; i <= 9; i++)
{
extern void search(player_type *creature_ptr);
extern void carry(bool pickup);
#ifdef TRAVEL
-extern void do_cmd_travel(void);
+extern void do_cmd_travel(player_type *creature_ptr);
extern void travel_step(void);
#endif