supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Tux spawns one block low underwater

Open Zwatotem opened this issue 3 years ago • 1 comments

SuperTux version: 0.6.3 System information: irrelevant

Expected behavior

When I place a spawn object in a level I expect Tux to be placed exactly in that square.

Actual behavior

Tux is being spawned exactly one block lower.

Steps to reproduce actual behavior

Examine the attached level, especially placement of spawn point. It is not placed in a spike. Yet Tux spawns in a spike. You can also recreate this level yourself.

test-swim-right.zip

Zwatotem avatar Jan 21 '22 00:01 Zwatotem

I've noticed that the game also prints messages saying Tux is spawning in a solid when he starts out on land. I think the current implementation spawns him below the tile then moves him up until he's free. If that's the case, I think it should be this way: start him right on the tile, then check a little ways down to see if there's solid ground, if there is, move him down, then move back up until he's in empty space.

KelvinShadewing avatar Mar 30 '22 15:03 KelvinShadewing