[1.3.3200] Enemy leans around wall from 1 tile away

Started by glass zebra, January 09, 2022, 04:49:25 PM

Previous topic - Next topic

glass zebra

There is a bug where enemies can lean around a wall and shoot while they are technically still 1 tile away from the wall they are leaning around.

In this screenshot Ally leaned around the wall and shot at my pawns while none of my pawns could target them, neither with psy nor guns.
https://steamuserimages-a.akamaihd.net/ugc/1841409612959906393/1BCED9DB6EF207AE0A77482A01F2A1FE5A21D422/

I then moved to the west so I can shoot through the opening. Ally stopped leaning and we have a shooting match. When Ally stopped leaning it was clear to see that they were indeed 1 tile north of the opening and not directly in it.

This bug has been in Rimworld for as long as I can think, but I yet do not know when it happens. It seems to happen more often when multiple pawns want to enter through the same opening. I play a lot with revolvers and funneling raiders into a chosen opening in my wall in early game, so it might have something to do with: lots of raiders sharing the same tile + stopping because they get attacked before they even fully entered the tile + being staggered by the revolvers. I don't know if there is an issue where they are in between tiles and then being attacked and shooting back, being able to shoot as if they were in the tile they just wanted to enter, but still being attributed to the tile they just wanted to leave, so you can't shoot them. Sorry for not having a real repro.


Edit: I did some tests and found an angle where the leaner can shoot but can not be targeted:
https://steamuserimages-a.akamaihd.net/ugc/1841409612959976495/526EB64DD1CC04E67648D73B535A667CECC1B046/
On that tile: Olivia can hit Lexi, but Lexi is unable to shoot back.
1 tile to the east: both can not shoot at each other.
1 tile to the west: both can shoot at each other.

Mirrored, the logic seems also different:
https://steamuserimages-a.akamaihd.net/ugc/1841409612959995972/083BD97BE8A9BAE11D288DDA4B6E830FE269675F/
Jono and Lexi are standing exactly in the same angle to Olivia. Oliva was able to shoot Lexi down where she is on the ground, but is unable to shoot Jono.
Is this intended? I thought walls were just supposed to give ~75% cover when people lean. It seems like there might be an issue with calculating the angles.


glass zebra

#2
Seems to be something like that. After testing it seems like it's just about the angles, but it's just weird that it does not happen mirrored. Since it usually happened to me when there was a ton of enemies trying to get through the same hole, I thought it might be some tile miscalculation.

What's extra on my case is that Ally leaned around the corner from 1 tile away. I guess that's just the animation if there is a wall close to the shooter in this case. Made it look like the enemy was very much in line of sight though and there was no way for me to just move a bit and not be shot at anymore. Now that I know how the bug works, it's easier to avoid.

So it seems this is a new report for the lean animation bug + an old one.

Pheanox

Thanks for the update, glass zebra.  I am going to put it in my internal doc for review of the system.