Improve UnitBuilderBotModule and BaseBuilderBotModule multi-queue performance#20133
Conversation
|
Note: the AI test case here is the way I making AI for SP and RV. I add a small cash cheat for AI's Conyers so as AI build more sub-base, they get more resources like human player expand their base for more resources. this also prevent AI get oneshot by superweapon, making new player have to learn to expand their base and forcus more on squad to win the AI game |
73d77c8 to
4811dad
Compare
0b15e09 to
c56f1ab
Compare
1c0a963 to
d287ad9
Compare
|
AI test has problem, will fix it later |
|
Should be all fixed, thanks for the reviews. |
9acc6d7 to
cbd50f2
Compare
RoosterDragon
left a comment
There was a problem hiding this comment.
Some small fixups, but otherwise LGTM.
|
Bug confirmed, it is strange that only cnc is normal. Will fix it later. |
|
Could it be that it's using cash instead of resources and cash? |
|
it is possible. In addition, We have
At this place we only use |
…rmance: 1. Only allow new item being queued when cash above a certain number 2. Only tick one kind of queues at one tick, reduce the pressure on the actived tick 3. 'BaseBuilderBotModule' will check all buildings in producing, avoid queue mutiple same buildings.
|
Add GetCashAndResources() to make the code more understandable on where use Cash + Resources. Also fix |
PunkPun
left a comment
There was a problem hiding this comment.
LGTM
GetCashAndResources() will be superseded by the pending resource refactor, though it will be easy to deprecate

UnitBuilderBotModule and BaseBuilderBotModule fix on muti-queue performance:
Only allow new item being queued when cash above a certain number
Only tick one kind of queues at one tick, reduce the pressure on the actived tick
'BaseBuilderBotModule' will check all buildings in producing, avoid queue mutiple same buildings.
About to make a testcase in cnc mod