Fixed very old swinging polydoor issue

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: Fixed very old swinging polydoor issue

Re: Fixed very old swinging polydoor issue

by Edward-san » Sat Feb 07, 2015 2:02 pm

I suppose this can be closed as [Added] ...

Re: Fixed very old swinging polydoor issue

by Edward-san » Sat Feb 07, 2015 8:06 am

Re: Fixed very old swinging polydoor issue

by Edward-san » Sat Feb 07, 2015 7:59 am

Anyways, it seems as if all the pull requests were merged.

I assume the solution to this is the second one, so I'll make a new pull request which removes the 'perpetual' code.

Re: Fixed very old swinging polydoor issue

by Edward-san » Sat Feb 07, 2015 7:57 am

But I asked some feedback in this thread....
Edward-san wrote:I'll wait for some feedback, then I can change the pull request to one or another branch accordingly.

Re: Fixed very old swinging polydoor issue

by Graf Zahl » Sat Feb 07, 2015 7:56 am

As a general rule, if you don't want to have a pull request merged, then *close it*!

Re: Fixed very old swinging polydoor issue

by Graf Zahl » Sat Feb 07, 2015 7:55 am

Was this part of something else? I can't remember merging this.

Re: Fixed very old swinging polydoor issue

by Edward-san » Sat Feb 07, 2015 7:38 am

Argh! Now you merged the first and wrong version...

Re: Fixed very old swinging polydoor issue

by Edward-san » Mon Jan 26, 2015 6:49 am

Well, I committed two possible solutions to the issue:

Just add 'm_Dist == 0' check;
Add 'm_Dist <= 0' and remove the perpetual code.

I'll wait for some feedback, then I can change the pull request to one or another branch accordingly.

Re: Fixed very old swinging polydoor issue

by Graf Zahl » Mon Jan 26, 2015 6:12 am

No idea, I just pointed out something that clearly was overlooked.

Re: Fixed very old swinging polydoor issue

by Edward-san » Mon Jan 26, 2015 5:40 am

Mmm, indeed ... what about if I change the added condition to m_Dist == 0? Apparently this, too, fixes the issue.

[edit]Although, which wad uses a perpetual swinging polyobj door? Sounds weird to me...

Re: Fixed very old swinging polydoor issue

by Graf Zahl » Mon Jan 26, 2015 2:57 am

I don't think this is correct. Have a look:

Code: Select all

		if (m_Dist <= 0 || poly->RotatePolyobj (m_Speed)) // <- disables rotation when m_Dist < 0
		{
			absSpeed = abs (m_Speed);
			if (m_Dist == -1)   <- ... so this means that perpetual polyobjs never rotate at all!
			{ // perpetual polyobj
				return;
			}
			m_Dist -= absSpeed;
			if (m_Dist <= 0)
			{
				SN_StopSequence (poly);
				if (!m_Close)
				{
					m_Dist = m_TotalDist;
					m_Close = true;
					m_Tics = m_WaitTics;
					m_Speed = -m_Speed;
				}
				else
				{
					Destroy ();
				}
			}

Fixed very old swinging polydoor issue

by Edward-san » Sun Jan 25, 2015 7:34 pm

Pull request.

I noticed this while testing the example wad for this zandronum ticket.

Load the harmless example wad: if a player blocks and tries to push the opened door, when the polyobj tried to close, it managed to rotate backwards wrongly, hence making the door pretty much bad.

It seems to work fine with the other example wads in the same ticket. I wonder why that code in case PODOOR_SWING was a little bit different from case PODOOR_SLIDE for all this time...

Top