HomeWildfire Games

Automatically cancel packing or unpacking based on given order

Description

Automatically cancel packing or unpacking based on given order

Cancel packing when next command requires unpacked state and cancel unpacking when next command requires packed state.

Fixing unit refusing to move because keeps unpacking to attack targets in range.

Partially Fixes: #4015, #5328
Differential Revision: https://code.wildfiregames.com/D1520
Patch by: @causative
Comments by: elexis, Freagarach, Stan

Event Timeline

elexis added a subscriber: elexis.Dec 28 2019, 3:08 PM

Thanks for the fix.

/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
147

Globals should be avoided, because they are accessible to any simulation script but only relevant for one component, so better put them into the protoype.

5161

(&& has higher operator precedence than || so the inner parentheses are not needed)