Project

General

Profile

Bug #2191

Energy weapon range update delay when switching ammos.

Added by smokemonkey over 2 years ago. Updated over 2 years ago.

Status:
Feedback Required
Priority:
Normal
Assignee:
Category:
annoyance
vbulletin_issue_id:

Description

code example:

if ${This.Charge(exists)} && ${This.Charge.Type.Equal[${shortRangeAmmo}]}

        {

            ; Memorize the short range ammo range.

            ;   _shortRangeAmmoRange:Set[${Utility.Max[${_shortRangeAmmoRange}, ${This.Range}]}]

        }

 

Even after the current ammo is already switched from long to short, there is a short period of time that the turret range still returns the long ammo range, so I cached the wrong range for short range ammo.

#1

Updated by Amadeus over 2 years ago

  • Category set to annoyance
  • Status changed from New to Feedback Required
  • Assignee set to Amadeus

I will need you to give me detailed information on how to recreate this bug.    What's a ship, weapon, ammo, etc. that I can buy (cheap) to test it with?    Can you create a script that switches the ammo and spews the weapon range that shows when/how it the bug happens?

There will definately be a delay -- but, if ISXEVE isn't updating as fast as the GUI is updating, then I can look into that.   But, there's no way to make it instant, since EVE uses python and nothing is "instant".

#2

Updated by smokemonkey over 2 years ago

Amadeus wrote:

I will need you to give me detailed information on how to recreate this bug.    What's a ship, weapon, ammo, etc. that I can buy (cheap) to test it with?    Can you create a script that switches the ammo and spews the weapon range that shows when/how it the bug happens?

There will definately be a delay -- but, if ISXEVE isn't updating as fast as the GUI is updating, then I can look into that.   But, there's no way to make it instant, since EVE uses python and nothing is "instant".

Actually I don't think range update needs to be instant, but I think it's possible that we make this ${This.Charge.Type.Equal[${shortRangeAmmo}]} NOT return TRUE before range is updated. 

Will update with script details later.

#3

Updated by smokemonkey over 2 years ago

I got this bug with short ammo 'Conflagration L'/ long ammo 'Scorch L' in weapon 'Mega Pulse Laser ||' which is fitted in an amarr battleship. Again I believe it should also happen on smaller weapon and cheaper ships.

you can see in this commit https://github.com/SmokeMonkey/Tehbot/commit/8b78e0bd670aca10b48dea944e70d38aa81bd726
that I try memorize the short ammo range to optimize ammo selecting,

then I reverted the change in commit https://github.com/SmokeMonkey/Tehbot/commit/5fd70b580748d407208cb1fec9b47aed2d907711
because I encountered the reported bug.

The module operating logic I wrote works with 200 milliseconds interval and the bug happened in basically every mission I do. You can add output after caching the range(just like the part I commented out in the second commit) and you will see that weapon loaded with short ammo still have long ammo range. It's expected that there is delay before the range is updated, but I hope the range is updated no later than the charge is displayed to be switched, or in another word, ${This.Charge.Type.Equal[${shortRangeAmmo}]} is TRUE.

The Module operation code is quite complicated to be cut out ot work inpendently. I would hope you try to test with tehbot in mission first. If that's difficult, let's try create a script switching ammo repeatly and output range every 200 milliseconds.

Also available in: Atom PDF