diff --git a/sources/GUI/NicePanelSkills.uc b/sources/GUI/NicePanelSkills.uc index 65ba5b9..c81517c 100644 --- a/sources/GUI/NicePanelSkills.uc +++ b/sources/GUI/NicePanelSkills.uc @@ -1,4 +1,5 @@ class NicePanelSkills extends Settings_Tabs; +// TODO change parent class / background var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5]; function ShowPanel(bool bShow){ local int i; diff --git a/sources/NicePlayerController.uc b/sources/NicePlayerController.uc index 52926c1..bc7d74f 100644 --- a/sources/NicePlayerController.uc +++ b/sources/NicePlayerController.uc @@ -1444,6 +1444,101 @@ exec simulated function Siren(float value) sirenScreamMod = value; } + +// copy-cat to fix MyTrader accessed none log spam +function ClientLocationalVoiceMessage(PlayerReplicationInfo Sender, + PlayerReplicationInfo Recipient, + name MessageType, byte MessageID, + optional Pawn SenderPawn, optional vector SenderLocation) +{ + local VoicePack Voice; + local ShopVolume Shop; + + if (Sender == none || Sender.VoiceType == none || Player.Console == none || Level.NetMode == NM_DedicatedServer) + { + return; + } + + Voice = Spawn(Sender.VoiceType, self); + if (KFVoicePack(Voice) != none) + { + if (MessageType == 'TRADER') + { + if (Pawn != none && MessageID >= 4) + { + foreach Pawn.TouchingActors(class'ShopVolume', Shop) + { + // fix this + if (Shop.MyTrader != none) + SenderLocation = Shop.MyTrader.Location; + else + SenderLocation = Shop.Location; + + // Only play the 30 Seconds remaining messages come across as Locational Speech if we're in the Shop + if (MessageID == 4) + { + return; + } + else if (MessageID == 5) + { + MessageID = 999; + } + + break; + } + } + + // Only play the 10 Seconds remaining message if we are in the Shop + // and only play the 30 seconds remaning message if we haven't been to the Shop + if (MessageID == 5 || (MessageID == 4 && bHasHeardTraderWelcomeMessage)) + { + return; + } + else if (MessageID == 999) + { + MessageID = 5; + } + + // Store the fact that we've heard the Trader's Welcome message on the client + if (MessageID == 7) + { + bHasHeardTraderWelcomeMessage = true; + } + // If we're hearing the Shop's Closed Message, reset the Trader's Welcome message flag + else if (MessageID == 6) + { + bHasHeardTraderWelcomeMessage = false; + } + + KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation); + + if (MessageID > 6 /*&& bBuyMenuIsOpen*/) + { + // TODO: Show KFVoicePack(Voice).GetClientParsedMessage() in the Buy Menu + } + else if (KFVoicePack(Voice).GetClientParsedMessage() != "") + { + // Radio commands print to Text + TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Trader'); + } + } + else + { + KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation); + + if (KFVoicePack(Voice).GetClientParsedMessage() != "") + { + TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Voice'); + } + } + } + else if (Voice != none) + { + Voice.ClientInitialize(Sender, Recipient, MessageType, MessageID); + } +} + + defaultproperties { nicePlayerInfoVersionNumber=1 diff --git a/sources/Perks/NiceVeterancyTypes.uc b/sources/Perks/NiceVeterancyTypes.uc index 19ebff2..24560b4 100644 --- a/sources/Perks/NiceVeterancyTypes.uc +++ b/sources/Perks/NiceVeterancyTypes.uc @@ -312,6 +312,7 @@ static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C) foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy) { + // check with stopwatch if (KFEnemy.Health > hp && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared) HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0); }