Page 1 of 1

[3.7pre-746-ge83af1590] Hideous Destructor enemies bug out

Posted: Thu Dec 06, 2018 2:55 pm
by TheMightyHeracross
Image

For some reason, enemy sprites (at least, in their walking states, because they seem to stand still while firing) in the latest HD release seem to repeatedly warp to the ceiling, fall, and warp back up again in the newest GZDoom build. I cannot reproduce this in 3.6.0.

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Thu Dec 06, 2018 7:29 pm
by Matt
The monster walking code in HD is a "bit" of a "mess" as they say.

Is this the case only in this map or all the time? And how rapidly does this happen?


EDIT: The basic principle of how it "works" is that it records the monster's position, calls the regular A_Chase, then moves back to the recorded position while adding the difference to its velocity, in hopes of ending up with a smoother movement (and an actual velocity for any AI opponents trying to lead their targets).

Without knowing anything else at this point, I suspect there's something wrong with that SetOrigin call that causes the monster to end up on the ceiling. I can't see how that could be the case though.

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Thu Dec 06, 2018 8:28 pm
by TheMightyHeracross
It happens in just about any map AFAIK, I just thought it was more noticeable here.

When I tested it using a very tall dummy map, I found that the zombie would warp back up upon hitting the floor- not when the animation loops, although it would have to be in the middle of the walking animation upon hitting the ground to warp back up. Additionally, the zombie was not spawning all the way up to the ceiling- it actually didn't get very high at first but gradually started warping higher in the air every time it landed.

Even weirder, some places (such as the damaging pit in MAP15) actually seemed to be spawning the zombies under the ground (this is for a split second, as they quickly warp back up to the surface again before going back under).
Image

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Fri Dec 07, 2018 1:06 am
by Matt
I'm running around on Map15 with the latest GZDoom master I just compiled and I'm unable to replicate this.

Could it be already fixed / related to this?

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Fri Dec 07, 2018 1:09 am
by Graf Zahl
No. That linked bug is just a bad BSP. It's also very strongly localized to specific positions in the map.

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Fri Dec 07, 2018 2:20 pm
by Matt
I can neither replicate this bug nor find anything in HD's code that could be a lead as to what's causing it.

Can you upload a video of this happening on a vanilla D2 map with no other mods loaded?

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Fri Dec 07, 2018 5:24 pm
by TheMightyHeracross
Here you go. Still happening in today's build. You can see them warping both into the air and underground in this video.

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Fri Dec 07, 2018 6:12 pm
by Matt
...alright, I've got no idea at all why that's happening and have never seen anything remotely like it all this time.

I've asked the people at the HD discord and no one's responded so far.

Does it still happen with the latest HD master? I messed around with a few things last night but none of them should have anything to do with this, but at this point it's just pure random shots in the dark as to what might be going on.


EDIT:
I just tried it on this Windows 7 machine using today's devbuild from DRDTeam, last HD release, Freedoom Phase 2. No warping zombies.
Sledge seems to be able to replicate it though, so I have no idea what's going on.

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Fri Dec 07, 2018 7:53 pm
by Matt
Can you try this build of HD? This may resolve the bug - the latest HD release has something in it that occasionally returns a NaN position if "posdif" is zero-length, which I think is the culprit:

Code: Select all

        vector3 posdif=caller.pos-oldpos;
        if(posdif dot posdif<(100*100)){
            caller.setorigin(oldpos,false);
            caller.vel*=0.7;
            caller.vel+=posdif.unit()*caller.speed*0.18;
        } 
I have no idea why it doesn't happen to me though.

EDIT: Here's a record of the changes before and after.

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Sun Dec 09, 2018 3:04 am
by _mental_
I cannot reproduce this using GZDoom at f6bb337 and HD 3.6.0.1.

Although, I've got this assertion failure. Value types are both integers but with different sizes, 2 vs. 4 bytes.
Not sure that it's unrelated to the initial bug report. Still this is an indication that something is missing on GZDoom side.

Re: [3.7pre-746-ge83af1590] Hideous Destructor enemies bug o

Posted: Sun Dec 09, 2018 10:22 am
by TheMightyHeracross
Whatever it was seems to have been fixed for me in the latest build, so I guess this can be closed?