Eduke32 flipped models not showing correctly
#1 Posted 19 September 2021 - 11:05 AM
I went to check in an older project using an eduke32 from 2018 and it displays properly flipped.
Since there probably aren't a lot of commits dealing with models will you be able to spot the possible revision in the GIT logs or will I have to bisect to find the exact revision?
EDIT: Further tesing revealed that only models that are actors refuse to flip in eduke32.
This post has been edited by Mark: 19 September 2021 - 11:19 AM
#2 Posted 19 September 2021 - 12:30 PM
Mark, on 19 September 2021 - 11:05 AM, said:
You probably have code in your CONs that is setting their cstat, which would override the cstat setting in mapster.
#3 Posted 19 September 2021 - 12:41 PM
Thanks.
This post has been edited by Mark: 19 September 2021 - 12:47 PM
#4 Posted 19 September 2021 - 12:54 PM
Mark, on 19 September 2021 - 12:41 PM, said:
Thanks.
Also, regardless of whether there is CON code doing it, CON code could prevent the flipping because you can save the cstat in EVENT_LOADACTOR and then apply it at level start if there is hardcoded fuckery changing it.
#5 Posted 19 September 2021 - 01:12 PM
Dumping the map using dndebug and loading debug.map shows it's still correctly set within Mapster.
I did more debugging, the model plays an animation via action and when I disable this it displays flipped like normal. I'm confused by this behavior, I was expecting models to obey this the same way sprites do, so am I not properly triggering the animation of the model? Basically we have a prop/detail model that should play an animation, but mappers should be able to place this and X-flip it if necessary.
Do I need to have 2 separate models/animations depending on if the model is X-flipped? Is there a missing step to get the animation played via action to obey the cstat?
The code for the whole actor is as follows:
useractor notenemy DOORKNOB { ifaction 0 action A_DOORKNOB //static animation else ifaction A_DOORKNOB { ifpdistl 768 ifp pfacing ifhitspace { action A_DOORKNOB_JIGGLE //jiggle animation soundonce DOORKNOBJIGGLE resetcount } } else ifaction A_DOORKNOB_JIGGLE { ifcount 30 { action A_DOORKNOB resetcount } } } enda
#6 Posted 19 September 2021 - 08:13 PM
#7 Posted 20 September 2021 - 03:23 AM
action A_DOORKNOB 0 action A_DOORKNOB_JIGGLE 1
But explicitly adding the full declaration with viewtype 1 to them didn't have any effect. I tried other viewtypes as well, and just different action settings in general, to no avail.
Someone suggested the model needs to be wall aligned (which seems like superstition IMO) but that also had no effect.
#10 Posted 21 September 2021 - 11:41 AM
Can you make a small test package that showcases the problem so we can debug this?
This post has been edited by Doom64hunter: 21 September 2021 - 11:42 AM
#11 Posted 21 September 2021 - 03:58 PM
test_duke.7z (2.7MB)
Number of downloads: 182
Here is the model with the code removed:
And with the code added:
I'm sure this is something on our side and not an engine bug, but I'm really scratching my head on this one.
#12 Posted 21 September 2021 - 08:46 PM
This post has been edited by Mark: 21 September 2021 - 08:49 PM
#13 Posted 04 October 2021 - 07:04 AM
Doom64hunter, on 21 September 2021 - 11:41 AM, said:
Can you make a small test package that showcases the problem so we can debug this?
#14 Posted 07 October 2021 - 02:06 AM
Mark, on 04 October 2021 - 07:04 AM, said:
Sorry, I was busy with work on Fury.
Bisection indicates that this is a very old problem, likely going back to when model support was first introduced into eduke32.
Further testing shows that the model flipping only works if the actor's action is set to the literal '0'.
#15 Posted 07 October 2021 - 11:36 AM
Doom64hunter, on 07 October 2021 - 02:06 AM, said:
It sounds like the workaround would be to make two different actors each with no action or action 0. A bit annoying to have to use two different tile numbers in the map editor just to have a flipped version, but doable.
#16 Posted 07 October 2021 - 01:59 PM
Or would I have to make a duplicate of the model, one idle and one animated and then use something other than action.That would be a total of 4 versions of the same model. 2 for each direction it faces. I'm better off telling the mapper to make all his doors open from the same side.
This post has been edited by Mark: 07 October 2021 - 02:05 PM