Page 1 of 1

Fixes for Door_AnimatedClose

Posted: Sat May 11, 2019 4:34 pm
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

Re: Fixes for Door_AnimatedClose

Posted: Sun May 12, 2019 1:15 am
by Graf Zahl
What's with this:

Code: Select all

			door->StartClosing();
			if (door->m_Status == DAnimatedDoor::Waiting)
			{
				door->StartClosing();
			}
?

Re: Fixes for Door_AnimatedClose

Posted: Sun May 12, 2019 5:06 am
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.