Author Topic: [BUG][PLAYER] Graphic error when flipping/inverting one-way arrows in editor  (Read 1827 times)

0 Members and 1 Guest are viewing this topic.

Offline Nessy

  • Posts: 579
    • View Profile
Steps to reproduce:

1) Open up the latest version of the NL Editor (1.13) and use a graphic set that uses the defaut one-way arrows.

2) Place any one-way arrow object onto the level and invert/flip it so that it points in the opposite direction.

3) In the editor the arrows are facing the correct way but when you open up the level in the latest NL Player (12.6.2) the arrows become white and start facing the direction they were facing before the invert/flip but they still behave the way they were after that invert/flip. So, for example, if you grab a left-facing one-way arrow object and flip it so that it faces the right it shows that it's pointing to the right in the editor but in the player it will face left and behave like it's a right-facing one-way arrow object.


« Last Edit: August 23, 2019, 08:15:03 PM by namida »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [BUG?][PLAYER] Graphic error when inverting one-way arrows in editor
« Reply #1 on: August 23, 2019, 01:21:04 AM »
It seems to be inconsistent as to whether the one-way arrows actually do flip or not. For example - place a one-way left arrow and rotate it into each direction. The right and up display as left, while the down displays as up.

Completely custom one-way arrows (eg. those in the fire set) are not affected, so this is probably to do with the recoloring - it might be incorrectly using the unrotated / etc graphics to generate the recolored one.
My Lemmings 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Confirmed that this is caused by something in the recoloring code. If I get rid of the recoloring effect on default:owa_XXXX, it no longer has this bug. (Of course, it doesn't recolor either without that line.) I further tried adding this recoloring effect to a different object (specifically, default:flag_blue) and sure enough, it started exhibiting the bug too.

Here's the result of various arrangements, and how they come out. All of them function correctly; the bug is purely visual.

For reference - the first set of directions (without the "2"), the opposite direction is made with a single flip or invert (as applicable). The ones at a 90 degree offset are made with a single rotation from the original state, then a single flip / invert for the opposite direction. Then, the ones on the right are made by copying the ones on the left, and flipping / inverting them - whichever one would not affect physics.

Of particular interest, is that some of them do actually come out correctly - or come out as a different wrong orientation. In all cases though, the alternate orientations don't get recolored.
« Last Edit: August 23, 2019, 08:37:17 PM by namida »
My Lemmings 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Fixed in commit 603DE08.

EDIT: No, maybe not as fixed as I thought. It seems to still happen when using testplay mode from the editor, just not when the level is loaded through the menu.
« Last Edit: August 24, 2019, 01:46:37 AM by namida »
My Lemmings 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
I've narrowed down the still-existing cases, to that it only still occurs with the first level that NL renders in a given session. Additionally, it now applies the transformations correctly in these cases, just not the recoloring.
My Lemmings 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)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Fully fixed in commit 49D0D0C.
My Lemmings 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)