I'm gonna explain further, since Malleo wasn't the one who looked through the code tons of hours in the past few days.
The glitch we are talking about is
this one.
The Mayor Pig has a fixed position he starts at and a fixed angle as soon as we enter the room with the house he's in. Before all the calculations the angle he moves at is set to 270° (0° is north, 90° is east, 180° is south and 270° is west).
Then the game does calculations with the angle:
It basically gets a random number modulo 60 (so that the number is from 0 to 59) and adds that to the angle and then removes 30.
This is done twice so the formula is:
angle = 270 + (RNG1 - 30) + (RNG2 - 30), with RNG1/2 as a random number from 0 to 59.
Simplifying that to a formula of:
angle = 210 + RNG1 + RNG2.
So the minimum angle is 210° and the maximum is 328° so I made a quick
picture displaying how the Mayor Pig can move (towards J is 210° and towards I is 328°). As soon as the Mayor Pig hits one of his movement-square edges he changes his angle by 180°.
He walks for around 300-400 frames and then stops for around 300-400 frames, until a new angle is calculated.
If he would have walked into the square, the scene would be triggered (the square is 100 pixels from the position, which is the nearest we can get to him from outside).
A shame that it isn't possible, it stopped progress for quite a bit...