Skip to content

HPX set incorrect for non-1080p resolution #5

Description

@kaedys

It appears that the global HPX, which is used to define how wide the HP bar is, is set before the HPX1 and HPX2 values are read from the ini file, resulting it in unconditionally having a value of 104, the difference between the default 908 and 1012 pixel positions for HPX1 and HPX2. This results in incorrect HP readings, causing the script to regularly see the HP values as >100%. For example, on at 4k resolution, where the HPX1 and HPX2 values are both doubled in the ini file, if the player has 70% health, the script will calculate it as 140% because it's dividing the pixel offset by 104 instead of the 208 pixel difference between the ini values.

https://github.com/nidark/Poe-Companion/blob/master/PoeCompanion.ahk#L136

I believe if you move this line (or the entire extra vars block) down to immediately below the ini read section, the bug should be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions