View Issue Details

IDProjectCategoryView StatusLast Update
0007644Multi Theft Auto : San AndreasClientpublic2013-06-11 01:36
ReporterarezuAssigned Toccw 
PrioritynormalSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version 
Target Version1.3.3Fixed in Version1.3.3 
Summary0007644: setElementPosition for players vehicle causes freeze for few seconds
Description

setElementPosition for players vehicle causes vehicle to freeze for few seconds randomly if the position is a few meters from your current position, it may be related to setting position outside ~7100 but it happens also a lot when setting position closer to gta world. Doesn't happen for vehicle with ped inside.

Additional Information

This messes up my new gamemodes completely

TagsNo tags attached.

Activities

arezu

2013-06-06 13:07

viewer   ~~0018664

Last edited: 2013-06-06 14:31

setting position outside the gta world (position > ~ 7100)* is what I wanted to write.

ccw

2013-06-07 01:30

administrator   ~~0018668

Need example positions.

arezu

2013-06-07 02:25

viewer   ~~0018673

Warp from: 4274.994140625, -7823.7319335938, 9.5998430252075
to: 4280.9638671875, -6990.0966796875, 384.05020141602

Cazomino05

2013-06-07 02:27

reporter   ~~0018674

you mean freeze as in in mid air and not moving rather than the game freezing which would be the window just not updating right?

this could be that the vehicle is waiting for collisions to load for that spot but I'm unsure if it is then that's by design rather than a bug

... because gravity.

ccw

2013-06-07 06:53

administrator   ~~0018686

Tried in 1.4 and 1.3, but could not see a freeze.

Please provide the custom map you are using so we can test again.

arezu

2013-06-07 13:37

viewer   ~~0018690

https://community.multitheftauto.com/index.php?p=resources&s=details&id=3752

arezu

2013-06-07 14:10

viewer   ~~0018692

Last edited: 2013-06-07 15:18

@Cazomino05 That would be strange because it happens even if you warp from a few meter from that position where everything is already loaded and sometimes when you warp it doesn't wait for collision at all so you fall through maps.

I found a fix for it. If you freeze the vehicle before setting position and rotation and then unfreeze yourself after then it wont stay frozen, but if you freeze yourself after setting position and then unfreeze then the freeze stays for a few seconds (you are left in a state where the velocity you set after wont go in effect until the freezing is over).

Edit: This fix doesn't work if you respawn (spawnPlayer and warpPedIntoVehicle) just before warping though.

ccw

2013-06-07 16:33

administrator   ~~0018693

Thanks for the map. Can you show me script snippets which reproduce these problems?

arezu

2013-06-07 16:50

viewer   ~~0018694

Last edited: 2013-06-07 16:51

http://www.mediafire.com/download/2olz118vs9z29k3/warp.zip
I use that script and use the commands to warp.
"Uncommenting" the setElementFrozen functions removes the freezing but if you spawn player and warp him into the vehicle before that then that fix doesn't work.

ccw

2013-06-07 20:49

administrator   ~~0018695

Seems to be caused by the streamer being at the object limit.
Fix is to disable asynchronous loading during spawn and positioning.

i.e.
engineSetAsynchronousLoading( false, true )
spawn player
create vehicle
warp player into vehicle
set vehicle position
engineSetAsynchronousLoading( true, true )

arezu

2013-06-07 21:13

viewer   ~~0018696

Last edited: 2013-06-07 22:46

Is there no other way to fix it? I have to remake all of my gamemodes with sync from client to server just for spawning for that.

Edit: nvm, I was able to fix it by only triggering to client to stop async loading before doing spawnPlayer and set async loading to true after spawnPlayer.

Edit 2: custom textures for objects fail to load sometimes after doing that fix (100% failure in some maps).

ccw

2013-06-11 01:35

administrator   ~~0018716

Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=5509

Issue History

Date Modified Username Field Change