The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: RESTRICTED ACCOUNT on July 14, 2019, 08:31:30 AM

Title: [Bug] Illegal teleport pedestrian
Post by: RESTRICTED ACCOUNT on July 14, 2019, 08:31:30 AM
Simutrans-standard's pedestrian is normal, but Extended's pedestrian somehow dislikes moving in the diagonal direction. ???
So they walk while teleporting.  :o They often cross the building illegally.  :police:
It creates strangeness in appearance. Walk in zigzags to interrupt the progress of the car and are also discontinuous.  :::)
(https://i.imgur.com/kLKdWcQ.gif)
Title: Re: [Bug] Illegal teleport pedestrian
Post by: ACarlotti on July 14, 2019, 01:03:02 PM
Part of the issue will be that the pedestrian graphics seem to be misaligned, which affects turning corners, though I haven't investigated this beyond in-game observations. However, the failure to follow a diagonal (using alternating orthogonal directions instead) will be a code issue - maybe something was changed in Standard that isn't yet in Extended.
Title: Re: [Bug] Illegal teleport pedestrian
Post by: Mariculous on December 18, 2019, 06:11:08 PM
So it's a pak bug, right?
Title: Re: [Bug] Illegal teleport pedestrian
Post by: jamespetts on December 19, 2019, 12:07:51 AM
Quote from: Freahk on December 18, 2019, 06:11:08 PM
So it's a pak bug, right?

I am not sure - this is reported as not being a problem in Standard; but on the other hand, the pedestrian graphics for the Extended version of Pak128.Britain are different from those of the Standard version. More testing would be required to confirm.
Title: Re: [Bug] Illegal teleport pedestrian (standard too)
Post by: RESTRICTED ACCOUNT on May 21, 2022, 01:13:11 AM
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/std-r10640-pedestrian-fix

In merging the recent modifications by ceeac in standard, I wanted to reduce some of the differences in the pedestrian code.
One thing I noticed is that james only partially (definition only) incorporated the pedestrian offset feature when incorporating the pedestrian animation feature 5 years ago.
I believe that incorporating this would have shifted the display position of the pedestrian (which I believe is approximately half of it) about one tile off from the road.
Does pak britain have two pedestrians, one for the left side and one for the right side?
Does standard design on the assumption that pedestrians will always walk on the same sidewalk as cars?
But ultimately I think there would be a discrepancy in the distance traveled on the curve otherwise.

And even with these incorporated, the diagonal pedestrian orientation is still broken but I have confirmed that this is also the case with the standard.
However, in rare cases (only when the cornering distance is small) they are moving in the correct diagonal direction.

I said earlier that the pedestrian diagonal movement wasn't broken in standard, but that seems to be an older version, and as of r10421 it's clearly broken.

EDIT: For reference, pedestrians are randomly determined to walk left or right at the time of generation.
This is a feature from r8254 and I don't think pak128.britain supports this correctly. In other words, the drawing position and offset are probably incorrect.
Title: Re: [Bug] Illegal teleport pedestrian
Post by: prissi on May 21, 2022, 06:41:24 AM
Yes, standard pedestrians also mostly refuse walking in diagonals. However, this is not easy to fix.
Title: Re: [Bug] Illegal teleport pedestrian
Post by: RESTRICTED ACCOUNT on May 21, 2022, 06:51:36 AM
Quote from: prissi on May 21, 2022, 06:41:24 AMYes, standard pedestrians also mostly refuse walking in diagonals. However, this is not easy to fix.
Just now I was checking the code for this and I think I may have fixed the behavior of this.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/commit/6ead998c6d5b7c9d7a309927855dc43edb622702
Please check pull request #542. This includes recent fixes by ceeac.
Title: Re: [Bug] Illegal teleport pedestrian
Post by: prissi on May 21, 2022, 02:04:55 PM
That looks indeed much better. Thank you.