diff --git a/sources/GUI/NiceInteraction.uc b/sources/GUI/NiceInteraction.uc index bbdac18..276a099 100644 --- a/sources/GUI/NiceInteraction.uc +++ b/sources/GUI/NiceInteraction.uc @@ -170,17 +170,21 @@ function PostRender(Canvas C) x += 128 + 4; } } + //// Draw weapons progress bars - if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress) + if (class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerMultitasker') + && nicePlayer.bFlagDisplayWeaponProgress && niceMutator.niceWeapProgressSet.length > 0) { - x = C.ClipX - InventoryBoxWidth * C.ClipX - 5; - y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length; - for(i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++){ - DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y, - C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team); - y += (InventoryBoxHeight * C.ClipX + 4); - } + x = C.ClipX - InventoryBoxWidth * C.ClipX - 5; + y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length; + for (i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++) + { + DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y, + C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team); + y += (InventoryBoxHeight * C.ClipX + 4); + } } + //// Draw invincibility bar nicePawn = NiceHumanPawn(nicePlayer.pawn); if(nicePawn != none && nicePawn.invincibilityTimer != 0.0) @@ -355,15 +359,18 @@ function DrawCalibrationStars(Canvas C){ x += 32 + 16; } } -function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team){ + +function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team) +{ local float textWidth, textHeight; local string textToDraw; local float TempWidth, TempHeight, TempBorder; + TempWidth = InventoryBoxWidth * C.ClipX; TempHeight = InventoryBoxHeight * C.ClipX; TempBorder = BorderSize * C.ClipX; // Draw background bar - if(team.teamIndex == 0) + if (team.teamIndex == 0) C.SetDrawColor(255, 64, 64, 64); else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B, 64); @@ -387,7 +394,8 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres C.SetDrawColor(255, 64, 64); else C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B); - if(weapProgress.bShowCounter){ + if(weapProgress.bShowCounter) + { textToDraw = string(weapProgress.counter); C.Font = class'ROHUD'.Static.LoadSmallFontStatic(5); C.TextSize(textToDraw, textWidth, textHeight); @@ -395,6 +403,7 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres C.DrawText(textToDraw); } } + function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta){ local bool bNeedsReload; local string Alias, LeftPart, RigthPart;