mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Object sync - fixes and improvements

Open FileEX opened this issue 1 year ago • 2 comments

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 onObjectDamage event based on synchronization
  • Added onObjectBreak event based on synchronization
  • Added onObjectMoveStart event
  • Added onObjectMoveStop event based on synchronization

Changes

  • Added almost all objects functions to server-side: setObjectProperty, getObjectProperty
  • Added getElementVelocity & getElementAngularVeloity functions for objects on the server-side
  • Added isElementInWater function for objects (shared)
  • Move eObjectProperty enum to the shared

Resolved issues: #460, #2752, #386 (probably)

Parts of this PR:

  • #3450 ✓
  • #3714 ✓

FileEX avatar May 26 '24 15:05 FileEX

Ok, this is quite a large PR, so I decided to split it into several smaller PRs to make the review easier.

FileEX avatar Jun 09 '24 00:06 FileEX

Maybe split this work into:

  1. Health and broken state of object sync.
  2. Position, velocity sync.
  3. Server controlled object properties.

lopezloo avatar Oct 11 '24 04:10 lopezloo

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.

github-actions[bot] avatar Jan 10 '25 01:01 github-actions[bot]

Bump?

lynconsix avatar Jan 20 '25 17:01 lynconsix

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.

github-actions[bot] avatar Apr 21 '25 02:04 github-actions[bot]

This draft pull request was closed because it has been marked stale for 30 days with no activity.

github-actions[bot] avatar May 21 '25 02:05 github-actions[bot]