-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
[1.6] Fix door sync #143
Conversation
float fRatio = pVehicle->GetDoorOpenRatio ( pPlayer->m_ucEnteringDoor ); | ||
if ( fRatio > 0 ) | ||
{ | ||
pVehicle->SetDoorOpenRatio ( pPlayer->m_ucEnteringDoor, 0, 0, true ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes issue 4.
else if ( ucStatus == DT_DOOR_SWINGING_FREE ) | ||
{ | ||
// Set it to intact first | ||
SetDoorStatus ( ucDoor, DT_DOOR_INTACT, bFlyingComponent ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important for issue 6.
pVehicle->SetSwingingDoorsAllowed ( false ); | ||
if ( m_bIsLocalPlayer ) | ||
{ | ||
pVehicle->SetSwingingDoorsAllowed ( false ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes issue 5.
Client/game_sa/CDamageManagerSA.cpp
Outdated
// 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 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
^ Closing this for now. I will create seperate issues for this and later try to merge some fixes into 1.5.x (if possible). |
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)