tchegito / zildo

The Land of Alembrume
GNU Lesser General Public License v3.0
4 stars 1 forks source link

Freeze on death #173

Closed tchegito closed 5 years ago

tchegito commented 5 years ago

Seen during tests on fourth episode, a freeze can occur during the death scene. Blocking happens at the script line which tries to set then hero's angle. It's impossible because hero still have a target.

To reproduce this one, player has to scroll from a map across a mountain, and PersoPlayer will keep a valued "target" member. It should have been set to NULL once scroll is over, but in this particular case, hero can't reach the spot, because of a floating point problem.

As hero's location is formed with 2 floats, but his target is only 2 integers, problem can occur. More than a complicated heuristic, best things to do would be to store target with floats too.

Original tested location was between "canyon" and "valori" at (771,1016) which is a non-walkable location.

tchegito commented 5 years ago

[Fixed in 2.56]

Now target is specified with floats, instead of ridiculous integers.

72d10c8de9875a8484f0832ffb0a07ad087ffa35