Page MenuHomeFeedback Tracker

Heavy performance issues with _pos nearestObject ID - (_pos nearestObject ID broken in A3 DEV branch)
Assigned, WishlistPublic


Whatever changes BIS have made to object ID's in the last dev branch update have caused nearestObject function to completely fail:

In debug console, with a object id I am standing next to. Also the exact position of the object doesnt help of course, if its not referenced correctly - locks the game up and never finds the object.

(getPos player) nearestobject 251753206;

result in RPT:
Performance warning: Very large search for 3938095 (>300 m)
Performance warning: Unsucessfull search for 3938095 was very large (30750 m)

Heres a picture:

in this case on screenshot the error even is... the search radius would must have been below 50 mtrs.

Performance warning: Unsucessfull search for -522349 was very large (8224 m)
Performance warning: Very large search for -522349 (>320 m)

-522349 ? {F23463}


Legacy ID

Event Timeline

highhead edited Additional Information. (Show Details)
highhead set Category to Performance.
highhead set Reproducibility to Always.
highhead set Severity to None.
highhead set Resolution to Open.
highhead set Legacy ID to 2215468805.May 7 2016, 6:10 PM

should be fixed in DEV. 116154 (will be distributed tomorrow)

thanks, will check tomorrow!

Can someone give me a feedback whether my patch has fixed the problem?

thanks, will try as soon I get back to the PC in some hours

Issue fixed for me :)

This issue is NOT FIXED, performance warnings are reduced but now object ids are not matching actual objects!!! I have attached an image to view the issue. Heres the image on imgur:

Heres a repro:

Load stratis

debug console
player setPos [4364.55,3677.35];

look at the cargo patrol building at this position.

watch these vars:

returns: 2fa1cf00# 100688780: cargo_patrol_v1_f.p3d

getPos player nearestObject 100688780
returns: 100688784: hbarrier_5_f.p3d

Note: this does not just happen with this building type, I saw many of these inconsistencies when doing a bulk test.

i can just agree with ARJay...

On a very simple QA analysis the issue becomes obvious so quickly...
I took the 10 minutes to analyse the houses incl. references on stratis: Of 682 "house" objects, over 450 are still broken, 66%!

thanks guys. You all have just discovered an interesting fact. New unique ID technology is designed for 4B scalar values(int), but whole A3 scripting mechanism is working with numbers represented as floating point based type. So precision is guaranteed for 22bits only(about 4mio). Well going to disable the whole uniqueID system and have to find out a better solution

Edit: sorry was thinking it was different structure. Confirmed.

hey guys! Thanks for rolling back the change, i know it must have been hard a day before release! I think you can close the ticket, as this special case wont pop up anytime soon! Thanks again!

k0rd added a subscriber: k0rd.May 7 2016, 6:10 PM
k0rd added a comment.Mar 27 2014, 12:42 AM

Hi - is it possible that something during the course of this ticket broke nearEntities? It seems to no longer let me use a string or array of strings as a type filter. It is saying it expects an object instead. This is the only thing in the changelog that I could see that could affect this, so I thought it might be appropriate to mention it here too.

[edit] I can make another ticket if necessary, just let me know.

k0rd: can you write a repro here? Even the simple one will be very helpful..

k0rd added a comment.Mar 27 2014, 5:04 PM

please disregard - i believe this was my error.