Implement Weapon Impulse Handling in lua
|Reported by:||REVENGE||Owned by:||somebody|
|Keywords:||impulse, weapons, lua||Cc:|
Description (last modified by )
The general gist is that DoDamage() will call ImpulseAdded(addedImpulse), and the impulse will be added accordingly to the unit's velocity vector dependent on its MoveType. The "residualImpulse" decays every Update according to some fixed value. The multipliers are added in via GameHelper when calculating damage, but I'm not entirely clear on how that portion works (but it should be transparent enough that you can just implement it as you see fit).
85.0 introduced some new stuff, particularly with features and collisions, but I'm not sure if you need to re-implement all of those features as well...
I'm uncertain if this is everything you need. Code is taken from 85.0. Caveat emptor, I found lots of changes in impulse handling between 0.82.7.1 and 85.0. I also do not know what parts of impulse are being removed from the next release, so I do not know what you want to recreate.