[FIXED] Trigger area not checked after stepping out of teleporter [BUG]

Started by Nepster, April 06, 2016, 07:56:32 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Nepster

During the first movement after stepping out of the receiver of a teleporter, no checks for trigger areas are made. So the lemming may safely fall through a trap, which should actually trigger.

Given the current code structure the easiest solution would be to let the lemming stand still for one frame after coming out and only move afterwards.
If we want, we may in addition shorten the receiver animation by one frame, so that lemmings don't get delayed by this one frame and replays don't fail. Drawback: Receiver animations may look ugly then and teleporters can take new lemmings one frame earlier.

Alternatively the telerporting code would need major changes, as the handling of lemming actions would get mixed up with object actions.

IchoTolot

Quote from: Nepster on April 06, 2016, 07:56:32 PM
Given the current code structure the easiest solution would be to let the lemming stand still for one frame after coming out and only move afterwards.
If we want, we may in addition shorten the receiver animation by one frame, so that lemmings don't get delayed by this one frame and replays don't fail. Drawback: Receiver animations may look ugly then and teleporters can take new lemmings one frame earlier.

This is like voting between 2 sicknesses.

Shorter teleporting animation would be ugly + screw up some stuff. I know at least 2 levels of mine which will need changes due to the faster teleporters.

Just the 1 frame standing still would be like the "object-fix" for skipping the first frame of the animation just in reverse and only for teleporters. It will break some replays, but no level I can think of. So I would rather vote for this as I also want good+correct looking teleporter animations.


namida

IIRC, the HandleLemming procedure is called after the lemming comes out - since no object check happens after this (and I assume your code doesn't change this), this is where the immunity comes from. I don't remember what it was, but there was a reason for this. If removing it, be sure to test carefully (or even better, get others to test it, as there will undoubtably be cases you didn't think of - I know this from experience, the hundreds of times bugs have occurred in situations I didn't think of), including situations such as falling into a teleporter (unless this is no longer allowed - IIRC there were some fairly good arguments for not allowing it, but I don't know if you actually made any changes in this regard), a receiver that leads to a fall, teleporting during various skills, etc.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

Quote from: namida on April 06, 2016, 08:22:24 PM
IIRC, the HandleLemming procedure is called after the lemming comes out - since no object check happens after this (and I assume your code doesn't change this), this is where the immunity comes from. I don't remember what it was, but there was a reason for this.
Perhaps this was done so that two-way teleporters don't teleport the lemmings back right away? I vaguely remember reading somewhere, that you want to remove two-way teleporters. So if I remember things correctly, the reason just might get obsolete. 

namida

No. This was in place long before two-way teleporters existed in NeoLemmix. I have a feeling that one reason was (completely possible to achieve by better methods) to ensure if the lemming was close to but not quite on the ground after teleporting it would move down, and that if it should come out as a faller, it doesn't perform another action for one frame first (or vice versa; debatable whether it really shouldn't or not). But I'm not sure if this was the only reason.

At any rate, it can't hurt to comment it out, see what happens, and put it (or a substitute for it) back if it has problems.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)