Opened 9 years ago

Last modified 8 years ago

#623 new change

tele_to should check the destination more carefully

Reported by: anonymous Owned by:
Milestone: v4 Keywords: magic
Cc:

Description

Currently, teleport_player_to() will teleport the player to the closest naked floor grid near a given location. This, however, poses problem when there are a lot of monsters or objects on the ground near that location. Since there is no extra check, this closest naked floor grid could be very far from the original location... resulting in a player teleported inside vaults, pits, or out of trouble, which sounds quite absurd considering the initial purpose of the tele_to spell.
I propose the following changes:

  • add a number of "tries" for determining the closest naked floor grid (no more dangerous while(1)...)
  • add a LOS check between desired location and closest naked floor grid
  • make teleport_player_to() fail if no appropriate location can be found

Change History (1)

comment:1 Changed 8 years ago by magnate

  • Keywords magic added
Note: See TracTickets for help on using tickets.