Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: IchoTolot on November 22, 2020, 07:46:08 PM

Title: [BUG][PLAYER] Spearer/Grenader can throw through walls
Post by: IchoTolot on November 22, 2020, 07:46:08 PM
Currently the spearer can throw through a 5 pixel wall and the grenader through a 1 pixel wall in front of a lem.

Both terrain checks should start at the lem's x coordinate to prevent this.

It is also possible to throw through a thin ceiling if the lem is directly under it. This is a result because the lemming is the "feet" and the projectile starting higher at the hand.

I dicussed this with namida and we tend to only check a few pixels below the projectile to throw out extreme cases and let throwing through very thin ceilings directly at the lemming's foot be possible - an example where this is also possible would be the climber being able to climb through rough terrain sticking out at the base. So it is consistent with that.

Visualization:

(https://cdn.discordapp.com/attachments/598671586203271219/780151878804701194/unknown.png)

So we would allow throwing through this and hitting ceilings would start if we move the upper pole a few pixels upwards.



In any case throwing through thin walls before the lem should always be prevented!

Side note: The "razor's edge" trick is possible with the spearer and if you throw it at a 1 pixel thin wall it gets stuck with 1 pixel sticking out. ;)   That is indeed consistent with builder, platformer, stacker,....
Title: Re: [BUG][PLAYER] Spearer/Grenader can throw through walls
Post by: namida on November 22, 2020, 07:52:00 PM
The overall proposal I've put forward here is:
- Start terrain checks when the projectile's pin has the same X coordinate as the lemming itself. (Current behavior: Terrain checks start when the projectile leaves the lemming's hand)
- On this first frame where terrain checks occur, do some additional checks below the projectile's position. Exact distance covered is TBD by experimentation. The projectile's position will not change in response to these checks, but if terrain is detected, the projectile "hits" immediately at its normal location for that frame.
Title: Re: [BUG][PLAYER] Spearer/Grenader can throw through walls
Post by: namida on December 05, 2020, 03:03:55 AM
Note to self: Test any fix with potential Cloner edge cases.
Title: Re: [BUG][PLAYER] Spearer/Grenader can throw through walls
Post by: namida on December 05, 2020, 03:33:12 AM
Change implemented in commit 2fc4387.