Yet another linedef type question--503 and 504

Status
Not open for further replies.

Fawfulfan

The Tortured Planet guy
The reason I keep asking about how these linedefs work is because I'm trying to fill in all the missing information in the SRB2 Wiki. But I've tried using Linedef Types 503 and 504, which are Accelerative and Displacement versions of Scroll Wall According to Linedef, and no setup I've tried makes these linedefs do anything. How do you make a linedef scroll acceleratively or through displacement?
 
Well it's no wonder you can't get 503 to work, the code is broken.

In P_SpawnScrollers(), p.spec.c, starting in line 6253:
Code:
if (special == 515 || special == 512 || special == 522 || special == 532 || special == 504) // displacement scrollers
{
	special -= 2;
	control = (int)(sides[*l->sidenum].sector - sectors);
}
else if (special == 514 || special == 511 || special == 521 || special == 531 || special == 504) // accelerative scrollers
{
	special--;
	accel = 1;
	control = (int)(sides[*l->sidenum].sector - sectors);
}
Line type 504 is erroneously tested twice. Because the second test is after an else, only the first one is ever reached -- and 503 is not recognized at all.

Basically these linedefs should work exactly the same way as the corresponding floor scrollers do. Move the floor/ceiling height of the control linedef's front sector and the target linedefs should scroll accordingly. Displacement controls speed by velocity, Accelerative controls speed by acceleration.
 
Well it's no wonder you can't get 503 to work, the code is broken.

In P_SpawnScrollers(), p.spec.c, starting in line 6253:
Code:
if (special == 515 || special == 512 || special == 522 || special == 532 || special == 504) // displacement scrollers
{
	special -= 2;
	control = (int)(sides[*l->sidenum].sector - sectors);
}
else if (special == 514 || special == 511 || special == 521 || special == 531 || special == 504) // accelerative scrollers
{
	special--;
	accel = 1;
	control = (int)(sides[*l->sidenum].sector - sectors);
}
Line type 504 is erroneously tested twice. Because the second test is after an else, only the first one is ever reached -- and 503 is not recognized at all.

Basically these linedefs should work exactly the same way as the corresponding floor scrollers do. Move the floor/ceiling height of the control linedef's front sector and the target linedefs should scroll accordingly. Displacement controls speed by velocity, Accelerative controls speed by acceleration.


Nice catch! I just committed the fix now, so I guess you'll have to wait until v2.0.5 to test out LD503.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top