[Added] Fixes for Door_AnimatedClose

Moderator: GZDoom Developers

Fixes for Door_AnimatedClose

Postby XxMiltenXx » Sat May 11, 2019 5:34 pm

I noticed a few issues with Door_AnimatedClose:
1. Door_AnimatedClose would always play the 1st frame and the sound when activated, even though the door in question is already closed. It'll now check for it and won't do anything if the door is closed.
2. When it is used with a tag (e.g. from another switch), there is no check if the door is already open and the door won't get closed. The door will now be closed, if it is open.

PR
XxMiltenXx
 
Joined: 08 Jan 2014
Location: Germany
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Fixes for Door_AnimatedClose

Postby Graf Zahl » Sun May 12, 2019 2:15 am

What's with this:

Code: Select allExpand view
         door->StartClosing();
         if (door->m_Status == DAnimatedDoor::Waiting)
         {
            door->StartClosing();
         }


?
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Fixes for Door_AnimatedClose

Postby XxMiltenXx » Sun May 12, 2019 6:06 am

Oh, thanks. The "door->StartClosing();" before the if-statement wasn't supposed to be submitted. I removed it in the PR.

It was a test I made, because "Door_AnimatedClose" will only close doors that are completely open and waiting. It cannot close doors that are still in the process of opening, even though it should be able to. But I didn't have a good idea on how to get that working as of yet, so I didn't try to fix it in that PR, beside that accidentally submitted line.
XxMiltenXx
 
Joined: 08 Jan 2014
Location: Germany
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests