Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master] Core/GameObject: Elevator teleports instead of moving #14704

Closed
burbur opened this issue May 15, 2015 · 14 comments
Closed

[master] Core/GameObject: Elevator teleports instead of moving #14704

burbur opened this issue May 15, 2015 · 14 comments

Comments

@burbur
Copy link

burbur commented May 15, 2015

Hello there. Don't know if you can help me.
I don't have Draenor branch downloaded, just the old cata one you deleted a bit ago (it seems) so i cannot post last revision or so :(

Anyway, i just downloaded it a while ago and didn't use it due to personal issues.
I was just wandering around in Icc killing things when I saw a problem with the Lady deathwhisper Icc Elevator, the one that starts after you kill her.

I just searched this repo to see if i was missing something and I've found this fix: 83668e8
I've just thought i missed it... but it was there. (Even because the elevator wasn't moving at the start).
Anyway here is a little video explaining what's the problem. (The Orgrimmar's elevators work like a charm anyway, like that fix "had fixed").

Video proof: https://vid.me/zZxj

Am I missing anything? Does this work in Draenor Branch?
Thank you.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Aokromes Aokromes added the Invalid-IncompleteData/OrNotTrinityCore Reporter deleted parts or all template or he is using a 3rd party unsupported core. label May 15, 2015
@ghost
Copy link

ghost commented May 15, 2015

@burbur : even if the source is moved, you can still post the full TC version string from your Worldserver.
Also, if needed, we can help you fix the revision link if your revision is not the latest available one.
The latest available 4.3.4 commit (so far) is this: https://github.com/TrinityCoreArchive/TrinityCore434/commit/073d749e6fa5e911358425976aa2bd63a2036c87

@DDuarte
Copy link
Contributor

DDuarte commented May 15, 2015

Would someone be kind and confirm the bug on 6.x?

@Killyana
Copy link
Member

Killyana commented May 15, 2015

On 6.X the object just teleports from a position to another without movements.

@DDuarte
Copy link
Contributor

DDuarte commented May 15, 2015

That seems to be what is happening in the video posted above.

@burbur
Copy link
Author

burbur commented May 15, 2015

@tkrokli yes thank you! It's that because i've just pulled until it was available the branch.

@Killyana In this case it does, because the behavior is the same. I've killed her "normally" and with ".die". Same result. The elevator starts and it just teleport up and down after the time (I believe) it needs to go from one side to the other. So if it need 24 seconds to go downstairs it will teleport after 24 seconds plus the time needed to be stopped on the "stopFrame", like in Shauren's fix is called.

@DDuarte yes. It just teleports with the player on it... it's like it has superspeed really, more than teleport. Seems like it takes the update to client (if it needed, don't know if we need to send the information to the client), or anyway the client updates the position, only when it comes to the "stopframe" saved in the gameobject_template.

@Killyana Killyana added Comp-Core Branch-master and removed Invalid-IncompleteData/OrNotTrinityCore Reporter deleted parts or all template or he is using a 3rd party unsupported core. labels May 16, 2015
@burbur
Copy link
Author

burbur commented May 17, 2015

I don't know if this could be of help but i just tried with another elevator, the one in halls of origination. I just wrote a little script for the controller that it's on the side. (The gossip were taken from a retail walkthrough but are not the important thing right now).
The elevator starts with GO_STATE_TRANSPORT_STOPPED.

The script for the two gossips is:
First:

go->SetTransportState(GO_STATE_TRANSPORT_ACTIVE);

Second:

go->SetTransportState(GO_STATE_TRANSPORT_ACTIVE, 0);
go->SetTransportState(GO_STATE_TRANSPORT_STOPPED, 1);

The reason for the second one is that with only (transport_stopped, 1) it doesn't move at all unless i click again the first... but i guess it's right in some way.
From what i remember in retail (i had an account in Cataclysm) there are a total of three stairs, the last one is available after you cleared all the bosses. (In game_object_template -> lift of the maker, the elevator has "three" stopframes, 0-10000-16667, even if the 0 is not counted.)
Until the third is available you can press those two gossip to make it goes downstair or upstair, to reach the floor you've selected.

Right now it seems it just teleport as you "switch" gobj state.

Video Proof: https://vid.me/dVoH

@joschiwald
Copy link
Contributor

try with 266c09f

@burbur
Copy link
Author

burbur commented May 21, 2015

@joschiwald Nothing to do... same behavior!

@burbur
Copy link
Author

burbur commented May 23, 2015

Well, i've just done some sniff today (on halls of origination elevator) with a friend's retail account... seems like this is what i got:

This is from when i press the second option to take it to the second floor. (GossipIndex: 1, while 0 is to the first floor, as in my video)

ClientToServer: CMSG_GOSSIP_SELECT_OPTION (0x1E0C) Length: 24 ConnIdx: 1 Time: 05/23/2015 14:06:56.125 Number: 217
GossipUnit: Full: 0x283AE45080CACD400014080000E087D9 GameObject/0 R3769/S5128 Map: 644 Entry: 207669 Low: 14714841
GossipID: 12646
GossipIndex: 1
PromotionCode: 

ServerToClient: SMSG_GOSSIP_COMPLETE (0x0010) Length: 0 ConnIdx: 0 Time: 05/23/2015 14:06:56.406 Number: 218

ServerToClient: SMSG_UPDATE_OBJECT (0x1CB2) Length: 42 ConnIdx: 1 Time: 05/23/2015 14:06:56.406 Number: 219
NumObjUpdates: 1
MapID: 644 (644)
HasDestroyObjects: False
Data size: 31
[0] UpdateType: Values
[0] Object Guid: Full: 0x143AE4001000000000000000000006BD Transport/0 R3769/S0 Map: 0 Low: 1725
[0] GAMEOBJECT_LEVEL: 2165917968/-2.815408E-38
[0] GAMEOBJECT_BYTES_1: 4278192921/-1.701988E+38

ClientToServer: CMSG_CLOSE_INTERACTION (0x1C36) Length: 15 ConnIdx: 1 Time: 05/23/2015 14:06:56.406 Number: 220
Guid: Full: 0x283AE45080CACD400014080000E087D9 GameObject/0 R3769/S5128 Map: 644 Entry: 207669 Low: 14714841

I guess the update_object is about the elevator, but i'm not sure.

Seems like it nees a "ForceValuesUpdate" at object_level and object_bytes_1, like in the update() function.

ForceValuesUpdateAtIndex(GAMEOBJECT_LEVEL);
ForceValuesUpdateAtIndex(GAMEOBJECT_BYTES_1);

Just an idea anyway.

Update 1: (I'm on 4.3.4 branch)
if you use

void GameObject::SetTransportState(GOState state, uint32 stopFrame /*= 0*/)
{
    if (GetGoState() == state)
        return;

    ASSERT(GetGOInfo()->type == GAMEOBJECT_TYPE_TRANSPORT);
    ASSERT(state >= GO_STATE_TRANSPORT_ACTIVE);
    if (state == GO_STATE_TRANSPORT_ACTIVE)
    {
        m_goValue.Transport.StateUpdateTimer = 0;
        m_goValue.Transport.PathProgress = getMSTime();
        if (GetGoState() >= GO_STATE_TRANSPORT_STOPPED)
            m_goValue.Transport.PathProgress += m_goValue.Transport.StopFrames->at(GetGoState() - GO_STATE_TRANSPORT_STOPPED);
        SetGoState(GO_STATE_TRANSPORT_ACTIVE);
    }
    else
    {
        ASSERT(state < GO_STATE_TRANSPORT_STOPPED + MAX_GO_STATE_TRANSPORT_STOP_FRAMES);
        ASSERT(stopFrame < m_goValue.Transport.StopFrames->size());
        m_goValue.Transport.PathProgress = getMSTime() + m_goValue.Transport.StopFrames->at(stopFrame);
        SetGoState(GOState(GO_STATE_TRANSPORT_STOPPED + stopFrame));
    }

    ForceValuesUpdateAtIndex(GAMEOBJECT_LEVEL);
    ForceValuesUpdateAtIndex(GAMEOBJECT_BYTES_1);
}

and elevator controller script:

switch (action)
            {
                case GOSSIP_ACTION_INFO_DEF:
                    elevator->SetTransportState(GO_STATE_TRANSPORT_ACTIVE);
                    elevator->SetTransportState(GO_STATE_TRANSPORT_STOPPED, 0);
                    break;
                case GOSSIP_ACTION_INFO_DEF+1:
                    elevator->SetTransportState(GO_STATE_TRANSPORT_ACTIVE);
                    elevator->SetTransportState(GO_STATE_TRANSPORT_STOPPED, 1);
                    break;
            }

It actually move normally from first floor to the second pressing gossip 1, but it just teleport when you are on the second floor, pressing gossip 0.

@Aokromes Aokromes changed the title Problem with stoppable Icc Elevator (Lady Deathwhisper one) [6.x] Elevator teleports instead of moving Jan 18, 2016
@Aokromes
Copy link
Member

This bug is still valid?

@Aokromes Aokromes self-assigned this Jun 18, 2016
@Aokromes
Copy link
Member

cannot reproduce on f663743

@Killyana Killyana reopened this Dec 21, 2017
@Killyana
Copy link
Member

Still happen on 7.x and 4.3.4

@ghost ghost changed the title [6.x] Elevator teleports instead of moving [master] Core/GameObject: Elevator teleports instead of moving Dec 22, 2017
@aquadeus
Copy link
Contributor

after last commits about transport is this still valid?

@Shauren
Copy link
Member

Shauren commented May 29, 2022

No, those commits specifically fix that issue

@Shauren Shauren closed this as completed May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants