Fixes for Door_AnimatedClose

Moderator: GZDoom Developers

Post Reply
XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

Fixes for Door_AnimatedClose

Post by XxMiltenXx »

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
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Fixes for Door_AnimatedClose

Post by Graf Zahl »

What's with this:

Code: Select all

			door->StartClosing();
			if (door->m_Status == DAnimatedDoor::Waiting)
			{
				door->StartClosing();
			}
?
XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Fixes for Door_AnimatedClose

Post by XxMiltenXx »

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.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”