Closed NiktosNOTD closed 6 years ago
This pull won't be getting extra commits. I'm investigating how to optimize events of "CriticalStrike" and "Backstab" triggers but if i find anything it will be in their own separate pulls as those require different aproach and testing changes related to them is harder.
I hope you're making sure that the event does not interfere with the existing stinger event.
No they not interfere, one could say they have even less interaction than in live game as the suggested here events simply ignore any stinger related shots for exact reason of it having it's own trigger. Before my changes stinger shots caused both AmmoUsage and AmmoUsageStinger to run, AmmoUsage simply never passed conditions. Now it does not run for stinger at all. It's same for L3 which also has it's own ammo related trigger. New implementation also completely ignores Crowbar which earlier triggered it only to never pass conditions.
This is probably not going to affect much performance wise, but if it does it will be towards less strain and better performance.
If you ever watched a replay with trigdebug open you probably noticed some trigger events have really high rate of 'failed conditions' like pic related (it's a normal AC game)![high fail rate events](https://user-images.githubusercontent.com/30372657/38312788-e927d674-3822-11e8-9477-557ec9a0b82e.png)
This Commit was what gave me an idea that this can be prevented, and without much workload too.
This pull request optimizes 2 big culprits "InfestorAI" and "AmmoUsage" As well as 14 smaller ones listed below.
Full changes