Allow weapon range modifiers to apply on ProjectileRange#2230
Conversation
8fa259a to
4a23258
Compare
4a23258 to
1206de7
Compare
|
Behaviour of projectiles immolated by Firestorm Wall should be tested, there's a high likelihood that this was broken here (something I realized as an afterthought). I will adjust the patches and hook accordingly if this turns out to be the case. |
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
|
tested it and firestorm wall seemed to behave like what it was before: can't intercept the projectile directly but changing its destination to a location near the wall. Not sure if this need to be adjusted and there're other issues: it can't affect range bonus from high ground, opentopped transport, Tank Bunker etc. These cases can also resulted in failure of projectile with range limit in addition, the game now becomes super laggy when a unit with |
ProjectileRangenow has weapon range modifiers applied to it if greater than 0 and unlessProjectileRange.ApplyModifiersis set to false on the WeaponType.Summary of changes:
Ranged=trueprojectile checks and updating projectile position to new coordinates.0x467BA4(Ares hook return address) with updated projectile range check as well as the skipped position update.BulletClass::Rangeas immutable initial max range (as opposed to distance that the projectile can still travel that is deducted from every frame) to preserve ability to check effective range with dynamic modifiers, distance traveled so far is stored in new fieldBulletExt::DistanceTraveled.Fixes the main underlying reason for #2227's existence, whether or not it has any reason to remain after addressing this I do not know.