Dankan37 / Arma-3-Iron-Dome

2 stars 1 forks source link

[Bug report] Too much detection distance can cause the game to lag periodically #1

Closed Affliction-TK closed 13 hours ago

Affliction-TK commented 7 months ago

When running this mod in the current version of Arma3 (I don't know if this problem exists in older versions as well), the game periodically stutters every few seconds when the trigger distance is set to be greater than 4000 meters.

I think this issue is related to the code associated with detecting flying objects within range. The problem seems to have been there from the start, it's just that its effects are less noticeable when the detection distance is small. The problems caused by this bug are very disruptive to the gameplay experience. When the detection distance reaches 10,000 meters, there is a noticeable lag almost every two seconds.

Dankan37 commented 7 months ago

Yes, I made this stuff some time back and the issue is due to the fact is runs: _near = _unit nearObjects [_typeArray select _i, _distance]; inside a isNil, forcing it run in a unscheduled environment, I don't recall the reasons why I chose this, a fix could be to schedule it, I'm currently not maintaining my mods but I may try to look into it, anyway the mods are released to the public.

Dankan37 commented 13 hours ago

fixed with the newest EH