Palamedes - 2014-02-09

Just to clarify, normally, when an ice cube is sprayed onto a spring, it will continue to move in the direction it was sprayed in - so you'd expect it to bounce off the spring and land on the other side. However, this won't happen if there's something in the way of the ice cube on the other side of the spring - for example, if the spring has been pushed against a wall.

I know it's unlikely - but if the player then sprays 500 or so ice cubes onto the spring, then enemies are likely to stop being drawn.

Anyway, I've found a fix. Firstly, I tried changing the condition on line 73 of src/item/ice_cube.c - from:
if ((self->flags & ON_GROUND) || self->standingOn != NULL)

if (self->environment != WATER)

However, I discovered that this had the effect of preventing an ice cube from continuing to move in the direction that it was thrown in. So it's better to split the list of instructions that are executed when this condition is met into two. The line:
self->dirX = 0;

... is still executed when the original condition is met - but everything else is executed when the new condition is met.

Have checked, and it seems that the expansion of an ice cube into a platform when it hits water, is not affected by this fix.