* Assume there is no monster blocking the destination
* Returns TRUE if repeated commands may continue
*/
-static bool do_cmd_open_aux(POSITION y, POSITION x)
+static bool do_cmd_open_aux(player_type *creature_ptr, POSITION y, POSITION x)
{
int i, j;
feature_type *f_ptr = &f_info[g_ptr->feat];
bool more = FALSE;
- take_turn(p_ptr, 100);
+ take_turn(creature_ptr, 100);
/* Seeing true feature code (ignore mimic) */
else if (f_ptr->power)
{
/* Disarm factor */
- i = p_ptr->skill_dis;
+ i = creature_ptr->skill_dis;
/* Penalize some conditions */
- if (p_ptr->blind || no_lite()) i = i / 10;
- if (p_ptr->confused || p_ptr->image) i = i / 10;
+ if (creature_ptr->blind || no_lite()) i = i / 10;
+ if (creature_ptr->confused || creature_ptr->image) i = i / 10;
/* Extract the lock power */
j = f_ptr->power;
sound(SOUND_OPENDOOR);
/* Experience */
- gain_exp(p_ptr, 1);
+ gain_exp(creature_ptr, 1);
}
/* Failure */
}
else
{
- more = do_cmd_open_aux(y, x);
+ more = do_cmd_open_aux(creature_ptr, y, x);
}
}
/* Locked doors */
else if (have_flag(f_ptr->flags, FF_OPEN))
{
- more = do_cmd_open_aux(y, x);
+ more = do_cmd_open_aux(p_ptr, y, x);
}
/* Bash jammed doors */