Table of Contents

00000001:0004 - FIX: Crash when element is recursively pushing itself

Information

Flags

Flag Set? (MUST/MAY/…) Description
parsing_must MUST NOT
reading_must MUST NOT
writing_must MUST NOT
playing_should MAY
playing_must MAY
editing_should MUST NOT

Field data

None.

Description

The most common case of this is when you duplicate a player-pushable element onto a player, which ends up calling the TouchProc against the source element with a direction equal to the player's movement direction.

Another case is performing a `#go idle` in a scroll.

Either way, both of these will no longer crash ZZT.

This does not, however, prevent the player from moving onto a duplicator's destination on the same tick that the duplicator fires and then the duplicator source ends up moving based on the player's move direction. That is a different bug which typically doesn't crash the game.

(by GreaseMonkey)

In particular, this amends ElementPushablePush to not call itself if deltaX and deltaY are both equal to 0.

Implementations