iron balls/teleds
Fixing some iron ball/teleds stuff: -- If the player can pass through walls, ignore all checks for walls, or else things will behave weirdly. -- Instead of using the kludge "if the distance is >2 it must be a teleport", pass a parameter indicating whether they crawled or teleported onto the new space. This fixes a special case, where the player moved one space and the ball didn't move, but the chain moved through solid rock. This is acceptable if teleporting and unacceptable if dragging. This also required some rearrangement of teleds() so that u.ux,u.uy are set after placing the ball, not before. I'm still not sure the pit filling line is in the right place; anyone know? -- add some comments so I can look at the code in a month and still know what I did. Most of this patch is just adding the new parameter.
This commit is contained in:
@@ -219,7 +219,7 @@ register int trouble;
|
||||
/* teleport should always succeed, but if not,
|
||||
* just untrap them.
|
||||
*/
|
||||
if(!safe_teleds())
|
||||
if(!safe_teleds(FALSE))
|
||||
u.utrap = 0;
|
||||
break;
|
||||
case TROUBLE_STARVING:
|
||||
@@ -256,7 +256,7 @@ register int trouble;
|
||||
case TROUBLE_STUCK_IN_WALL:
|
||||
Your("surroundings change.");
|
||||
/* no control, but works on no-teleport levels */
|
||||
(void) safe_teleds();
|
||||
(void) safe_teleds(FALSE);
|
||||
break;
|
||||
case TROUBLE_CURSED_LEVITATION:
|
||||
if (uarmf && uarmf->otyp==LEVITATION_BOOTS
|
||||
|
||||
Reference in New Issue
Block a user