accessed None 'MyTrader' fix
This commit is contained in:
parent
f72cb160ed
commit
51ce9f52fa
@ -1,4 +1,5 @@
|
|||||||
class NicePanelSkills extends Settings_Tabs;
|
class NicePanelSkills extends Settings_Tabs;
|
||||||
|
// TODO change parent class / background
|
||||||
var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5];
|
var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5];
|
||||||
function ShowPanel(bool bShow){
|
function ShowPanel(bool bShow){
|
||||||
local int i;
|
local int i;
|
||||||
|
@ -1444,6 +1444,101 @@ exec simulated function Siren(float value)
|
|||||||
sirenScreamMod = 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
|
defaultproperties
|
||||||
{
|
{
|
||||||
nicePlayerInfoVersionNumber=1
|
nicePlayerInfoVersionNumber=1
|
||||||
|
@ -312,6 +312,7 @@ static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C)
|
|||||||
|
|
||||||
foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy)
|
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)
|
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);
|
HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user