View Issue Details

IDProjectCategoryView StatusLast Update
0009339Multi Theft Auto : San AndreasScriptingpublic2018-02-21 00:24
Reportereinheit-101Assigned Toccw 
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version1.5.3 
Summary0009339: attachElements() 1-frame lag when "a lot" of elements are attached

If you attach two elements to each other and then attach one element to another element like this:
element1 -> element2 -> element3

element1 will follow element2; while element2 will follow element3.
This works fine for element2 following element3. However, the last part in this chain, element1, will now have a 1-frame lag while trying to follow element2 when a lot of them have been attached.

Steps To Reproduce

srun car = createVehicle(457, 0, 0, 5) setElementData(root, "car", car)

crun car = getElementData(root, "car") for i=1, 6 do obj1 = createObject(1337, 0, 0, 5, 0, 0, 0, true) obj2 = createObject(1327, 0, 0, 5, 0, 0, 0, true) attachElements(obj1, obj2) attachElements(obj2, car) end

-> This code generates a Golf Car with 6 attached giant wheels. On each of these wheels i attached 1 recycle bin. Enter the Car, drive. Notice the recycle bins start lagging.

Additional Information

I am currently creating a script which attaches multiple turrets to 1 vehicle (7 turrets). Every turret consists of 2 parts, the barrel and the turret itself. The barrels are lagging because of this issue.

TagsNo tags attached.



2016-08-21 00:40

reporter   ~~0025065

Notice this issue is already visible with only 3-4 turrets attached which makes a total of 6-8 attached elements to the vehicle. The more you attach, the higher the delay gets. If anyone knows a workaround i would be pleased (converting my turrets into vehicles and attaching the vehicles is one solution, but imho this could and should be fixed here)


2016-08-21 06:49

administrator   ~~0025066

Fixed in latest 1.6 build 9882
May cause side effects - Please test with all your scripts.


2016-08-21 13:47

reporter   ~~0025067

Last edited: 2016-08-21 14:05

View 2 revisions

What side effects could you mean? Anything attachement related or even other random things?

€DIT::: Tested this with the latest nightly. The bug is indeed fixed and so far everything works (all attachements, attached custom weapons, sounds, whatever) but i dont know if anything else has been broken that i didnt test.

My warships work fine tho, completely fine.


2016-08-22 18:45

manager   ~~0025070


2016-08-23 00:49

reporter   ~~0025071

Can this be added to 1.5.2 or is a release of 1.6 planned in near future?


2016-08-23 15:45

administrator   ~~0025076

It may be added in 1.5.3.

Issue History

Date Modified Username Field Change