Spawned Negative Damage fix
close #222 Please test and confirm if the fix working correcly for the issue mentioned!
Nightly build for this pull request:
- compiled-dll-21da70e78c0c7b51297c607d905c489a46a5e312.zip This comment is automatic and is meant to allow guests to get latest nightly builds without registering. It is updated on every successful build.
Ok so I tested the build you sumitted, and made various tests (mostly adding/removing AttackFriendlies=, OpportunityFire= and CanPassiveAquire= on both the spawner and the spawned). So it works... kinda. Here's the sequence of events that I have :
- Once the spawner get in GuardRange=6 of a vehicle, it will automatically spawn the first of its two Repair Drone, regardless of the vehicle's health pool. If no vehicles are within GuardRange=6, the drone lands back on the spawner and waits for a friendly vehicle to come close once more; 2.a If the vehicle is at full health, the spawner continously targets and launch its repair drone (but only the first one of two?), meaning that the drone will fly around "attacking" the vehicle, but will abandon mission instantly and try to land back on the spawner (it has a landing sound that indicate it tries to land on the spawner, so that's how I know); 2.b If the vehicle, or another nearby vehicle within GuardRange=6, is damaged, both repair drone will go into "attack" mission to repair it. It will only attack the required amount of time so that all damaged vehicle are at full health. Success!
- Once all damaged vehicles are fully repaired, the second drone goes back to the spawner and lands, and the first one goes back into the attack mission loop described in point 2.a
I hope this helps! Thank for the time you're taking to fix this, very appreciated.
I had refactored it to make the code cleaner, please test it when you are available @Danielovich7
After retesting, here's what happens :
https://user-images.githubusercontent.com/79372870/120852345-12e13b80-c548-11eb-97de-681b69bbe859.mp4
Also, the spawner now seems to be unable to "let go" of a target and will follow any vehicle that is not in its spawn range
Currently, if a spawn with a too high speed, it will probably got stuck, such as the HORNET with Speed = 26. I think we should make this PR in draft until all the hidden problems are all set.