Innoxia / liliths-throne-public

Public repository for Lilith's Throne. (18+)
Other
510 stars 436 forks source link

Issue where the enemies UI wouldn't display correctly during combat #453

Open Nenoxx opened 6 years ago

Nenoxx commented 6 years ago

Version : 0.2.4.5 From : Blogspot Date : 8 May 2018

"Noticed a bug with the fight vs Brax. Instead of the stats view of his health, arousal etc, it remains on the characters present UI element during combat, thus your unable to see how much damage or lust he currently has, forcing you to open up his discription page instead."

I was able to reproduce this bug against Karl and Wolfgang.

image

MarianSijanin commented 6 years ago

Confirmed against Brax too... This bug is introduced in 0.2.4.5, specifically by RenderingEngine.getCharacterToRender() changes. Me thinks it is not necessary to check getCharacterToRender() when in combat at all?

MarianSijanin commented 6 years ago

It's fixed in 0.2.5. But is it safe to use Combat.getEnemies().get(0) in getCharacterToRender() without checking array size?

        if(Main.game.isInCombat()) {
            return Combat.getEnemies().get(0);
        }