mtasa-blue
mtasa-blue copied to clipboard
Object sync - fixes and improvements
I undertook the repair and improvement of object synchronization, which has been disabled since 2011.
I was unable to reproduce the bugs described in #460
I realize that this is quite a big PR, so I will be very grateful for any kind of feedback and reliable tests to eliminate any bugs and to safely merge this PR. I tested everything myself on the local server and I don't have the opportunity to test it with other players, so I'm not sure if all the problems have been eliminated.
Changes
Fixes
- Code refactoring
- Small changes
New events
- Added
onObjectDamageevent based on synchronization - Added
onObjectBreakevent based on synchronization - Added
onObjectMoveStartevent - Added
onObjectMoveStopevent based on synchronization
Changes
- Added almost all objects functions to server-side:
setObjectProperty,getObjectProperty - Added
getElementVelocity&getElementAngularVeloityfunctions for objects on the server-side - Added
isElementInWaterfunction for objects (shared) - Move
eObjectPropertyenum to the shared
Resolved issues: #460, #2752, #386 (probably)
Parts of this PR:
- #3450 ✓
- #3714 ✓
Ok, this is quite a large PR, so I decided to split it into several smaller PRs to make the review easier.
Maybe split this work into:
- Health and broken state of object sync.
- Position, velocity sync.
- Server controlled object properties.
This draft pull request is stale because it has been open for at least 90 days with no activity. Please continue on your draft pull request or it will be closed in 30 days automatically.
Bump?
This draft pull request is stale because it has been open for at least 90 days with no activity. Please continue on your draft pull request or it will be closed in 30 days automatically.
This draft pull request was closed because it has been marked stale for 30 days with no activity.