Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Damage preview doesn't display anything on ShotHUD for abilities with 0 minimum damage #1447

Open
BlackDog86 opened this issue Jan 5, 2025 · 1 comment

Comments

@BlackDog86
Copy link
Contributor

BlackDog86 commented Jan 5, 2025

This means that abilities which are configured with zero base damage, but have a PlusOne set on the ability template, will not show their damage on the shot HUD.

This comes from the following code in UITacticalHUD_ShotHUD

if (MinDamage > 0 && MaxDamage > 0)
		{
			if (MinDamage == MaxDamage)
				ShotDamage = String(MinDamage);
			else
				ShotDamage = MinDamage $ "-" $ MaxDamage;

			if( MinDamageValue.BonusDamageInfo.Length > 0 || MaxDamageValue.BonusDamageInfo.Length > 0 )
			{
				AddDamage(class'UIUtilities_Text'.static.GetColoredText(ShotDamage, eUIState_Warning2, 38), true);
			}
			else
			{
				AddDamage(class'UIUtilities_Text'.static.GetColoredText(ShotDamage, eUIState_Good, 36), true);
			}
		}

and UITacticalHUD_InfoPanel

if (MinDamage > 0 && MaxDamage > 0)
	{		
		if(MinDamage == MaxDamage)
			ShotDamage = String(MinDamage);
		else
			ShotDamage = MinDamage $ "-" $ MaxDamage;

		AddDamage(class'UIUtilities_Text'.static.GetColoredText(ShotDamage, eUIState_Good, 36), true);
	}

Suggest changing these to OR conditions so that abilities with 0-1 damage display their previews properly (e.g. below)
20250105154707_1

@BlackDog86 BlackDog86 changed the title Damge preview doesn't display anything for abilities with 0 minimum damage Damage preview doesn't display anything on ShotHUD for abilities with 0 minimum damage Jan 5, 2025
@BlackDog86
Copy link
Contributor Author

Should be noted that this will have 0 effect for anyone running Extended Information as it MCOs these classes anyway but it would be nice to make it work properly for those who don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant