SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 19/07/2012, 12:20 AM   #1
Strawhats
High-roller
 
Strawhats's Avatar
 
Join Date: Nov 2010
Location: Zaandam (Holland)
Posts: 1,454
Reputation: 239
Default Surfing object bug (attached objects)

Hello,

I have noticed this weird bug and I am sure this is not script related.
It has to do with attached object which are attached to a vehicle. In my case, a shipobject attached to a boat.


Things I can say about what happened in this video:

1. Spawning has most of the time sync, depends on who has spawned (the driver or the player).
2. When Player A is driving and Player B is on the ship and is synced and leaves the position and moves around and then comes back, the player is desynced (weird velocity problems).
3. When Player A is not driving and Player B is on the ship and is desynced and leaves the position and comes back to the position WITHOUT moving when he/she changed position, the player is still desynced. (weird velocity problems when Player A drives).
4. When Player A is not driving and Player B is on the ship and is desynced and leaves the position and comes back to the position WITH moving when he/she changed position, the player is synced when Player A starts driving the boat.

My thoughts:

There is something wrong with the streaming of attached objects.
When you move location to solid objects, which aren't attached and afterwards you create those attached objects, you are synced, but once they are already created and you move location to the attached objects, there are these weird velocities problems...

What are you thoughts?

EDIT: I would like to say that when noone is driving, the boat is destroyed, once Player A drives, a boat is created.
EDIT 2: Didn't get it? I gave an explanation on irc:

Code:
<Strawhat>: Ok, I'll explain it.
<Strawhat>: When Player A and B are on a boat, which has attached objects and Player A is driving, while Player B is walking on the attached objects, they are both synced.
<Strawhat>: But once Player B teleports to a different location and walks a bit there and comes back to the ship and walks on the attached objects.
<Strawhat>: Player B has weird desync problems, weird velocity problems.
<Strawhat>: The only way to fix that, is to remove the attached objects and teleport away and back again.
<Strawhat>: If you create a ship with attached objects again after you did that, you can walk normally again on the attached objects.
<Strawhat>: I have to say that the ship vehicle does get destroyed and recreated too.
<Strawhat>: That link has a video to it though, where you can view it.
<Strawhat>: So
EDIT 3:

I found out this only happens with dynamic object, which are actually playerobjects. SA-MP 0.3e released AttachPlayerObjectToVehicle, I think something went wrong with it, since normal objects attach correctly to a vehicle and there are no velocity problems with normal objects, only with dynamic (player) objects. I think this is a great find.


EDIT 4:

Requested by Jernejl,
I've uploaded this script for you, so you can test it yourself, you can do this alone too.

/shipobject makes a normal ship, with CreateObjects.
/shipdynamicobject makes a dynamic ship, with CreateDynamicObject.

/slap yourself up on one ship (remember which one it is) and do /savepos, move a bit around and then do /pos, you will get teleported on the ship you were on. If this is the normal ship, everything is fine, but when you do the same with the dynamic ship, you get these weird velocity problems.

Apart from that I've also added a /spawn command.


http://pastebin.com/4bsmy7Zv

EDIT 5:

IT also happens with normal objects (static onces). It only happens if you first destroy them and later recreate them. Normal teleporting is fine though, but once you destroy and recreate them later, you have these problems too.
__________________

CONTINUED - FACEBOOK Interested in playing League of Legends? Register here please: CLICK ME

Last edited by Strawhats; 11/01/2013 at 11:44 PM.
Strawhats is offline   Reply With Quote
Old 19/07/2012, 09:26 PM   #2
[Twixx]
Gangsta
 
[Twixx]'s Avatar
 
Join Date: Nov 2011
Location: Latvia
Posts: 714
Reputation: 117
Default Re: Desync of attached objects, stream?

You should use some function which detects if player is on ship, and then sync's him along with ship. For example if you TP away, and then back, script detects that you're on the boat and re-sync's you.

Not sure if this might help, not so big pro in scripting, but thought of giving at least some help.
[Twixx] is offline   Reply With Quote
Old 19/07/2012, 09:32 PM   #3
Strawhats
High-roller
 
Strawhats's Avatar
 
Join Date: Nov 2010
Location: Zaandam (Holland)
Posts: 1,454
Reputation: 239
Default Re: Object surfing bug (attached objects)

I heard of the evil that you camp with the same issues. I hope you fixed it that way.
__________________

CONTINUED - FACEBOOK Interested in playing League of Legends? Register here please: CLICK ME

Last edited by Strawhats; 19/07/2012 at 10:32 PM.
Strawhats is offline   Reply With Quote
Old 20/07/2012, 04:06 AM   #4
Rudy_
Gangsta
 
Rudy_'s Avatar
 
Join Date: Nov 2011
Location: Home Reputation:9999
Posts: 875
Reputation: 140
Default Re: Desync of attached objects, stream?

There are some "Talks" with what it can be fixed not sure though.
You need a timer which set's the speed from "Slow" to "the real speed" so the player is standing Sync'd with the object.
If the ship moves directly fast the player will be De-sync'd.
Also i have heard that how big object then the less these sync shit.
Good luck to both.
__________________
GTA PropHunt - PM for more Info.
Rudy_ is offline   Reply With Quote
Old 20/07/2012, 09:31 AM   #5
Strawhats
High-roller
 
Strawhats's Avatar
 
Join Date: Nov 2010
Location: Zaandam (Holland)
Posts: 1,454
Reputation: 239
Default Re: Desync of attached objects, stream?

Correct. Ive informed The Evil about this. Rudy I am not sure whether that works, because i've noticed that even when the ship isnt moving, you can have this surfing bug.
__________________

CONTINUED - FACEBOOK Interested in playing League of Legends? Register here please: CLICK ME
Strawhats is offline   Reply With Quote
Old 20/07/2012, 08:58 PM   #6
Strawhats
High-roller
 
Strawhats's Avatar
 
Join Date: Nov 2010
Location: Zaandam (Holland)
Posts: 1,454
Reputation: 239
Default surfing bug, found what's wrong.

Editted the first post.
Check EDIT 3
__________________

CONTINUED - FACEBOOK Interested in playing League of Legends? Register here please: CLICK ME
Strawhats is offline   Reply With Quote
Old 21/07/2012, 06:48 AM   #7
Rudy_
Gangsta
 
Rudy_'s Avatar
 
Join Date: Nov 2011
Location: Home Reputation:9999
Posts: 875
Reputation: 140
Default Re: Desync of attached objects, stream?

Cool, you found any fix yet?
__________________
GTA PropHunt - PM for more Info.
Rudy_ is offline   Reply With Quote
Old 21/07/2012, 09:19 AM   #8
Strawhats
High-roller
 
Strawhats's Avatar
 
Join Date: Nov 2010
Location: Zaandam (Holland)
Posts: 1,454
Reputation: 239
Default Re: Desync of attached objects, stream?

As i said it"s a samp bug. The temporary fix is to use normal objects instead of dynamic objects.
__________________

CONTINUED - FACEBOOK Interested in playing League of Legends? Register here please: CLICK ME
Strawhats is offline   Reply With Quote
Old 21/07/2012, 11:16 AM   #9
Strawhats
High-roller
 
Strawhats's Avatar
 
Join Date: Nov 2010
Location: Zaandam (Holland)
Posts: 1,454
Reputation: 239
Default Re: Desync of attached objects, stream?

Requested by Jernejl,
I've uploaded this script for you, so you can test it yourself, you can do this alone too.

/shipobject makes a normal ship, with CreateObjects.
/shipdynamicobject makes a dynamic ship, with CreateDynamicObject.

/slap yourself up on one ship (remember which one it is) and do /savepos, move a bit around and then do /pos, you will get teleported on the ship you were on. If this is the normal ship, everything is fine, but when you do the same with the dynamic ship, you get these weird velocity problems.

Apart from that I've also added a /spawn command.


http://pastebin.com/4bsmy7Zv
__________________

CONTINUED - FACEBOOK Interested in playing League of Legends? Register here please: CLICK ME
Strawhats is offline   Reply With Quote
Old 15/08/2012, 03:23 PM   #10
ShOoBy
Huge Clucker
 
ShOoBy's Avatar
 
Join Date: Mar 2011
Location: Europe
Posts: 205
Reputation: 50
Default Re: Desync of attached objects, stream?

This is not a new bug ...
The Object surfing was bugged for ages.. Example: when you are on a moving object and you try to jump from it , you are still moving in mid air with the object. Or another one: If you are on a object , when it rotates your rotation is not set as the object rotates. Or another one: If you are for example in the corner of a square and the square starts to rotate you are not moving.

In my oppinion this should be the first necessary update to SAMP 0.3e R3 or 0.3f
__________________
ShOoBy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Player Camera Goes Trough Objects And Attached Objects. [WSF]ThA_Devil Scripting Help 1 20/11/2013 03:40 PM
[Help] Attached objects almost invisible danqueiroz Scripting Help 1 06/07/2012 08:48 PM
Help Stream Objects - Mido Stream Seba97 Help Archive 1 13/08/2011 07:48 AM
Attached Objects Disappearing GuikBretas Help Archive 1 27/02/2011 01:43 PM
[BUG] Attached objects jonrb Help Archive 3 02/12/2010 11:53 PM


All times are GMT. The time now is 09:46 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.