Fixes for Door_AnimatedClose

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Fixes for Door_AnimatedClose

Re: Fixes for Door_AnimatedClose

by XxMiltenXx » Sun May 12, 2019 5: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.

Re: Fixes for Door_AnimatedClose

by Graf Zahl » Sun May 12, 2019 1:15 am

What's with this:

Code: Select all

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

Fixes for Door_AnimatedClose

by XxMiltenXx » Sat May 11, 2019 4: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

Top