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:
@@ -1126,7 +1126,7 @@ domove()
|
||||
/* Move ball and chain. */
|
||||
if (Punished)
|
||||
if (!drag_ball(x,y, &bc_control, &ballx, &bally, &chainx, &chainy,
|
||||
&cause_delay))
|
||||
&cause_delay, TRUE))
|
||||
return;
|
||||
|
||||
/* Check regions entering/leaving */
|
||||
|
||||
Reference in New Issue
Block a user