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

Ped rotation sync is broken

Open Zangomangu opened this issue 1 year ago • 5 comments

Describe the bug

maybe caused by https://github.com/multitheftauto/mtasa-blue/commit/f5b599c9f45777f924f7980cadb2d3cc6431d8b8

Steps to reproduce

spawn ped and check rotation for non-syncing player

Version

client 22596 server 22600

Additional context

No response

Relevant log output

No response

Security Policy

  • [X] I have read and understood the Security Policy and this issue is not security related.

Zangomangu avatar Jul 06 '24 10:07 Zangomangu

I may be an old bug https://github.com/multitheftauto/mtasa-blue/issues/1928#issuecomment-750002744 https://github.com/multitheftauto/mtasa-blue/pull/1506

dmi7ry avatar Jul 06 '24 20:07 dmi7ry

it started happening after i updated

Zangomangu avatar Jul 06 '24 20:07 Zangomangu

it started happening after i updated

Since the commit mentioned was introduced in version r22529, have you checked version r22523?

FileEX avatar Jul 07 '24 01:07 FileEX

Tested this in r22518 and peds synchronised by another client were walking just fine, in r22529 they would constantly reset their rotation and face north.

Commendatore1 avatar Jul 08 '24 11:07 Commendatore1

Wasn't able to reproduce this bug. Additional information required. Please, attach your resource or/and record a video.

tederis avatar Aug 10 '24 04:08 tederis

ped_sync_fail.zip

Here is a resource that spawns a ped in SFA. It displays the rotation of the ped and if you are the syncer. When the ped is synchronised by another client and you are in a version beyond r22518 it would constantly reset the rotation. Here is a video of the resource: https://github.com/user-attachments/assets/c42e1f2c-a4fd-4b6b-80cb-6612783f5df2

Commendatore1 avatar Oct 27 '24 14:10 Commendatore1

This also affects the ability of a ped to fire a weapon if they possess one. When we force control fire to true and set the ped's rotation and target on the client side, the ped will shoot, but no bullets will come out of the weapon. This means that damage to a player the ped is shooting at will not be synchronized. Since that update, systems like armed guard peds shooting at players have been broken.

C0DELEVEL avatar Jan 11 '25 15:01 C0DELEVEL

Thanks so much for the clarification and the new information. I'll look into it in the near future.

tederis avatar Jan 11 '25 15:01 tederis

Could someone submit a revert for https://github.com/multitheftauto/mtasa-blue/commit/f5b599c9f45777f924f7980cadb2d3cc6431d8b8 in the meantime?

Zangomangu avatar Jan 25 '25 18:01 Zangomangu

I found the source of problems and going to fix it next week.

tederis avatar Jan 26 '25 04:01 tederis

I've pushed a fix for problems described by @Commendatore1 and @Zangomangu. And it seems that problem described by @C0DELEVEL has also been resolved. But if some of the problems pops up again, please, let me know.

tederis avatar Jan 29 '25 08:01 tederis

Unbelievable, I have already lost all my nerve cells on this. I started developing my own zombie system, and when testing on one pc and on a laptop I saw this problem, ped was turning north, the one who became the element synchronizer saw everything stable, I even specifically managed the state through setElementSyncer and observed this problem, this was the reason why I finished the development, now I will continue if the tests show that everything is fine.

Kooberium avatar Jan 29 '25 11:01 Kooberium

Unbelievable, I have already lost all my nerve cells on this. I started developing my own zombie system, and when testing on one pc and on a laptop I saw this problem, ped was turning north, the one who became the element synchronizer saw everything stable, I even specifically managed the state through setElementSyncer and observed this problem, this was the reason why I finished the development, now I will continue if the tests show that everything is fine.

I understand your feelings. I just want to note that these problems could be easily overcome by using animations instead of analog controls. I had overlooked that some people use controls instead of animations.

tederis avatar Jan 29 '25 12:01 tederis

can confirm it's fixed, thx tederis

Zangomangu avatar Jan 31 '25 17:01 Zangomangu