Nostrademous / Dota2-FullOverwrite

Work in progress for a full-overwrite Dota 2 bot framework
GNU General Public License v3.0
97 stars 40 forks source link

Issues with blink usage, bots with blink getting stuck #217

Closed Riveon closed 7 years ago

Riveon commented 7 years ago

There seem to be issues with the calculation of blink direction, both for retreating when in danger, and initiating. In one case this led to LC getting stuck. Here are some examples: gfycat.com/VastEnergeticGermanpinscher ^After blinking, LC stayed here for three minutes even though she had blink and a tp (that wasn't on cd and that she had sufficient mana for). She finally teleported to her mid tier 2 tower once Dire started attacking it. gfycat.com/PopularYellowishAmethystgemclam gfycat.com/GrizzledBiodegradableBonobo (I'm guessing she intended to initiate here)

CsharpNoobDude pointed out in another thread:

Blink is weird in a lot of ways - probably the same reasoning as for some abilities like Invokers Alacrity - initiating but not committing to doing it. Edit: The heroes blink in and then retreat, that is the case for about 50% of the blink uses....

Nostrademous commented 7 years ago

Yes, for retreat purposes I reversed my scaling calculations for mapping blink-to location resulting in a negative offset rather than a positive one, and as a result this makes them blink in the opposite direction.

For initiating purposes that should not happen as LC will blink directly to the targets current position vector.

Nostrademous commented 7 years ago

I fixed it "blind", meaning I fixed and pushed the code without testing it. Hopefully it doesn't break anything.

Nostrademous commented 7 years ago

Actually, while I fixed the scaling to be faster, it might not have been the issue as I was using Pythagorean calculation which makes absolute value anyways.

Nostrademous commented 7 years ago

Okay, fixes to fixes, tested and pushed.