Door/lift weirdness
I've been playing around with EQEmu 0.5.5 (bear with me), and I've been looking into two issues:
1. Why doors sometimes don't close when you click on them, and
2. Why gfay lifts don't always move when you ask them to.
Here is what I found:
Normal doors take about a second to swing open and automatically close after another ten seconds.
Lifts move 1 unit roughly every 116 ms (making a roughly 8-second travel time for the newbie lift, for example) and revert to their normal state 20 seconds after they have landed.
The gfay lifts have their invert_state flag set.
For the close timer, I found that setting it to 17000ms for lifts (opentype = 59) and 7000ms for all other doors seems to work well. I don't know why I have to shave off three seconds, but this is what I'm seeing.
When dealing with inverted doors/lifts, the following code should be added in doors.cpp:
if (GetInvertState())
{
if (md->action == 0x02)
{
md->action = 0x03;
}
else if (md->action == 0x03)
{
md->action = 0x02;
}
}
This should come right before the OP_MoveDoor packet is sent out in Doors::HandleClick.
I know that I'm dealing with EQEmu 0.5.5, but I looked at doors.cpp in the cvs code and it seems virtually the same. Someone might want to give this a try with the newer code and report back.
|