KF2-Server-Extension/ServerExt/Classes/ExtMoviePlayer_HUD.uc

106 lines
3.4 KiB
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class ExtMoviePlayer_HUD extends KFGFxMoviePlayer_HUD;
function TickHud(float DeltaTime)
{
local PlayerController PC;
PC = GetPC();
2020-11-28 20:12:58 +00:00
if (PC!=none && PC.PlayerInput!=None)
2017-10-20 02:00:49 +00:00
Super.TickHud(DeltaTime);
}
2020-11-28 20:04:55 +00:00
final function ShowKillMessageX(PlayerReplicationInfo PRI1, PlayerReplicationInfo PRI2, optional string VictimStr, optional bool bDeathMessage = false, optional class<Pawn> PawnOther)
2017-10-20 02:00:49 +00:00
{
2020-11-28 19:53:57 +00:00
local GFxObject DataObject;
local bool bHumanDeath;
local string KilledName, KillerName, KilledIconpath, KillerIconPath;
local string KillerTextColor, KilledTextColor;
2017-10-20 02:00:49 +00:00
2020-11-28 20:12:58 +00:00
if (KFPC == none)
2020-11-28 19:53:57 +00:00
return;
2017-10-20 02:00:49 +00:00
2020-11-28 20:12:58 +00:00
if (KFGXHUDManager != none)
2020-11-28 19:53:57 +00:00
{
2020-11-28 20:12:58 +00:00
if (PawnOther != none)
2017-10-20 02:00:49 +00:00
{
2020-11-28 20:12:58 +00:00
if (bDeathMessage)
2017-10-20 02:00:49 +00:00
{
KillerTextColor = ZEDTeamTextColor;
KillerName = class'KFExtendedHUD'.Static.GetNameOf(PawnOther);
}
else
{
KilledName = class'KFExtendedHUD'.Static.GetNameOf(PawnOther);
bHumanDeath = false;
}
}
2020-11-28 20:12:58 +00:00
if ((PawnOther==None || !bDeathMessage) && PRI1 != none)
2017-10-20 02:00:49 +00:00
{
2020-11-28 20:12:58 +00:00
if (PRI1.GetTeamNum() == 255)
2017-10-20 02:00:49 +00:00
{
KillerTextColor = ZEDTeamTextColor;
KillerIconpath = "img://"$class'KFPerk_Monster'.static.GetPerkIconPath();
}
else
{
KillerTextColor = HumanTeamTextColor;
2020-11-28 20:12:58 +00:00
if (ExtPlayerReplicationInfo(PRI1)!=None && ExtPlayerReplicationInfo(PRI1).ECurrentPerk!=None)
2017-10-20 02:00:49 +00:00
KillerIconpath = ExtPlayerReplicationInfo(PRI1).ECurrentPerk.static.GetPerkIconPath(0);
}
2020-11-28 19:53:57 +00:00
KillerName = PRI1.PlayerName;
2017-10-20 02:00:49 +00:00
}
2020-11-28 20:12:58 +00:00
if (PRI2 != none)
2017-10-20 02:00:49 +00:00
{
2020-11-28 20:12:58 +00:00
if (PRI2.GetTeamNum() == class'KFTeamInfo_Human'.default.TeamIndex)
2017-10-20 02:00:49 +00:00
{
bHumanDeath = true;
KilledTextColor = HumanTeamTextColor;
}
else
{
KilledTextColor = ZEDTeamTextColor;
bHumanDeath = false;
}
KilledName = PRI2.PlayerName;
2020-11-28 20:12:58 +00:00
if (ExtPlayerReplicationInfo(PRI2)!=None && ExtPlayerReplicationInfo(PRI2).ECurrentPerk!=None)
2017-10-20 02:00:49 +00:00
KilledIconpath = ExtPlayerReplicationInfo(PRI2).ECurrentPerk.static.GetPerkIconPath(0);
}
2020-11-28 20:12:58 +00:00
else if (VictimStr!="")
2017-10-20 02:00:49 +00:00
{
KilledTextColor = HumanTeamTextColor;
KilledIconpath = "img://"$class'KFPerk_Monster'.static.GetPerkIconPath();
bHumanDeath = false;
KilledName = VictimStr;
}
DataObject = CreateObject("Object");
DataObject.SetBool("humanDeath", bHumanDeath);
DataObject.SetString("killedName", KilledName);
DataObject.SetString("killedTextColor", KilledTextColor);
DataObject.SetString("killedIcon", KilledIconpath);
DataObject.SetString("killerName", KillerName);
DataObject.SetString("killerTextColor", KillerTextColor);
DataObject.SetString("killerIcon", KillerIconpath);
//temp remove when rest of design catches up
DataObject.SetString("text", KillerName@KilledName);
KFGXHUDManager.SetObject("newBark", DataObject);
}
}
defaultproperties
{
WidgetBindings.Remove((WidgetName="SpectatorInfoWidget",WidgetClass=class'KFGFxHUD_SpectatorInfo'))
WidgetBindings.Add((WidgetName="SpectatorInfoWidget",WidgetClass=class'ExtHUD_SpectatorInfo'))
WidgetBindings.Remove((WidgetName="PlayerStatWidgetMC",WidgetClass=class'KFGFxHUD_PlayerStatus'))
WidgetBindings.Add((WidgetName="PlayerStatWidgetMC",WidgetClass=class'ExtHUD_PlayerStatus'))
WidgetBindings.Remove((WidgetName="PlayerBackpackWidget",WidgetClass=class'KFGFxHUD_PlayerBackpack'))
WidgetBindings.Add((WidgetName="PlayerBackpackWidget",WidgetClass=class'ExtHUD_PlayerBackpack'))
WidgetBindings.Remove((WidgetName="WeaponSelectContainer",WidgetClass=class'KFGFxHUD_WeaponSelectWidget'))
WidgetBindings.Add((WidgetName="WeaponSelectContainer",WidgetClass=class'ExtHUD_WeaponSelectWidget'))
2017-10-20 02:00:49 +00:00
}