Skip to content

3.3.3 performance fixes#154

Open
Spoffy wants to merge 2 commits intogenesis92x:3.3.3-developfrom
official-antistasi-community:3.3.3-Performance-Fixes
Open

3.3.3 performance fixes#154
Spoffy wants to merge 2 commits intogenesis92x:3.3.3-developfrom
official-antistasi-community:3.3.3-Performance-Fixes

Conversation

@Spoffy
Copy link
Copy Markdown

@Spoffy Spoffy commented Nov 23, 2019

In 3.3.3, there's a stutter that causes the framerate to drop to about 10fps every 10 seconds or so.

This is caused by some really expensive calls to 'nearTargets', followed by sorting that list - both of those operations cost many milliseconds.

The changes made here alter how ClstKnwnEnmy works to avoid those issues. There may be minor changes to behaviour as a result, but nothing I've noticed in testing.


//Vehicular groups in "SAFE" behaviour will move in convoys
if (!isNull objectParent _unit && {behaviour _unit isEqualTo "SAFE"}) exitWith
if (!isNull objectParent _unit && {behaviour _unit == "SAFE"}) exitWith
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isEqualTo is faster because it is case sensitive... and behaviour only outputs "SAFE"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants