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

[1.6] Fix door sync #143

Closed
wants to merge 4 commits into from

Conversation

Projects
None yet
4 participants
@lopezloo
Copy link
Member

commented May 26, 2017

Fixes few vehicle door issues. It's still not perfect but way better than before. Fixes #453.

Issue 1

Passenger door freezes mid entering sometimes.

Reported on mantis as #8546.

Issue 2

Sometimes door closes mid jacking a driver.

Before: https://youtu.be/MsmkJqCVYhI
After: https://youtu.be/wvIvaJpu9LM

Issue 3

Sometimes doors closes mid entering as passenger.

Before: https://youtu.be/VJkfvId-tL4
After: https://youtu.be/rgYSBXbexCs

Issue 4

Driver door don't close if you jack a player from passenger side.

Before: https://youtu.be/I3h0XgTSTCU
After: https://youtu.be/GQ0KfVr-l0Q
After#2: https://youtu.be/s9TWCEED8AI (warpPedIntoVehicle case)

Issue 5

Doors freezes after (any) player exit passenger seat.

Before: https://youtu.be/mqLpPFP-6Ng
After: https://youtu.be/aRcGjbOyeCw

Issue 6

setVehicleDoorState doesn't work for certain states.

Reported on mantis as #4185.
Before: https://youtu.be/IkWj0CW88JI
After: https://youtu.be/EhNhAKhiiO4

Issue 7

Fallen off door and panel components spawn near vehicle on stream in.

Mentioned in #3449
Before: https://youtu.be/He52i70rQjY
After: https://youtu.be/WK2V34vt5z4
(notice how lovely windshield breaks)

float fRatio = pVehicle->GetDoorOpenRatio ( pPlayer->m_ucEnteringDoor );
if ( fRatio > 0 )
{
pVehicle->SetDoorOpenRatio ( pPlayer->m_ucEnteringDoor, 0, 0, true );

This comment has been minimized.

Copy link
@lopezloo

lopezloo May 26, 2017

Author Member

This fixed issue 1.

// so he will be able to close it
if ( pInsidePlayer->m_ucEnteringDoor == 3 && pVehicle->GetDoorAjarStatus ( 2 ) == false )
{
pVehicle->SetDoorAjarStatus ( 2, true );

This comment has been minimized.

Copy link
@lopezloo

lopezloo May 26, 2017

Author Member

Fixes issue 4.

else if ( ucStatus == DT_DOOR_SWINGING_FREE )
{
// Set it to intact first
SetDoorStatus ( ucDoor, DT_DOOR_INTACT, bFlyingComponent );

This comment has been minimized.

Copy link
@lopezloo

lopezloo May 26, 2017

Author Member

Important for issue 6.

pVehicle->SetSwingingDoorsAllowed ( false );
if ( m_bIsLocalPlayer )
{
pVehicle->SetSwingingDoorsAllowed ( false );

This comment has been minimized.

Copy link
@lopezloo

lopezloo May 26, 2017

Author Member

Fixes issue 5.

// Are we making it intact?
if ( bDoorStatus == DT_DOOR_INTACT || bDoorStatus == DT_DOOR_SWINGING_FREE )
// Update door model (only if needed - this gonna shut the door)
if ( bOldBashed != bNewBashed || bDoorStatus == DT_DOOR_MISSING || ucOldStatus == DT_DOOR_MISSING )

This comment has been minimized.

Copy link
@lopezloo

lopezloo May 26, 2017

Author Member

Fixes issue 2 & 3. Updating door model causes angle reset so we want to avoid this in some situations (for example changing from state 0 to 1).

@lopezloo lopezloo added the bug label May 26, 2017

@lopezloo lopezloo changed the title Fix door sync [1.6] Fix door sync Jun 13, 2017

@lopezloo lopezloo added this to the 1.6 milestone Jun 13, 2017

@Necktrox

This comment has been minimized.

Copy link
Contributor

commented Feb 15, 2018

I managed to freeze a passenger door, is this part of the issue 5 or not?

Door Sync

qaisjp added some commits Aug 23, 2018

@lopezloo

This comment has been minimized.

Copy link
Member Author

commented Oct 12, 2018

^
No, it looks more like issue 1.

Closing this for now. I will create seperate issues for this and later try to merge some fixes into 1.5.x (if possible).

@lopezloo lopezloo closed this Oct 12, 2018

@lopezloo lopezloo removed this from the 1.6 milestone Oct 12, 2018

@lopezloo lopezloo removed the question label Oct 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.