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.
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.