fix: ScriptWarning: Accessed None 'Killer'
ScriptWarning: Accessed None 'Killer' 011ServerExtMut KF-TrapLandAlter.TheWorld:PersistentLevel.ServerExtMut_0 011Function ServerExtMut.ServerExtMut:ScoreKill:00BF
This commit is contained in:
parent
54fd79c924
commit
f729eebe51
@ -601,29 +601,35 @@ function CustomXP(Controller Killer, Controller Killed)
|
|||||||
|
|
||||||
function ScoreKill(Controller Killer, Controller Killed)
|
function ScoreKill(Controller Killer, Controller Killed)
|
||||||
{
|
{
|
||||||
local KFPlayerController KFPC;
|
local KFPlayerController KFPC;
|
||||||
local ExtPerkManager KillersPerk;
|
local ExtPlayerController ExtPC;
|
||||||
|
local ExtPerkManager KillersPerk;
|
||||||
|
local KFPawn_Monster KFPM;
|
||||||
|
|
||||||
if (bRespawnCheck && Killed.bIsPlayer)
|
if (bRespawnCheck && Killed.bIsPlayer)
|
||||||
CheckRespawn(Killed);
|
CheckRespawn(Killed);
|
||||||
|
|
||||||
if (KFPawn_Monster(Killed.Pawn) != None && Killed.GetTeamNum() != 0 && Killer.bIsPlayer && Killer.GetTeamNum() == 0)
|
KFPM = KFPawn_Monster(Killed.Pawn);
|
||||||
|
if (KFPM != None && Killed.GetTeamNum() != 0
|
||||||
|
&& Killer != None && Killer.bIsPlayer && Killer.GetTeamNum() == 0)
|
||||||
{
|
{
|
||||||
if (ExtPlayerController(Killer)!=None && ExtPlayerController(Killer).ActivePerkManager!=None)
|
ExtPC = ExtPlayerController(Killer);
|
||||||
ExtPlayerController(Killer).ActivePerkManager.PlayerKilled(KFPawn_Monster(Killed.Pawn),LastKillDamageType);
|
if (ExtPC != None && ExtPC.ActivePerkManager != None)
|
||||||
if (bKillMessages && Killer.PlayerReplicationInfo!=None)
|
ExtPC.ActivePerkManager.PlayerKilled(KFPM, LastKillDamageType);
|
||||||
BroadcastKillMessage(Killed.Pawn,Killer);
|
|
||||||
|
if (bKillMessages && Killer.PlayerReplicationInfo != None)
|
||||||
|
BroadcastKillMessage(Killed.Pawn, Killer);
|
||||||
|
|
||||||
CustomXP(Killer, Killed);
|
CustomXP(Killer, Killed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MyKFGI != None && MyKFGI.IsZedTimeActive() && KFPawn_Monster(Killed.Pawn) != None)
|
if (MyKFGI != None && MyKFGI.IsZedTimeActive() && KFPM != None)
|
||||||
{
|
{
|
||||||
KFPC = KFPlayerController(Killer);
|
KFPC = KFPlayerController(Killer);
|
||||||
if (KFPC != none)
|
if (KFPC != None)
|
||||||
{
|
{
|
||||||
KillersPerk = ExtPerkManager(KFPC.GetPerk());
|
KillersPerk = ExtPerkManager(KFPC.GetPerk());
|
||||||
if (MyKFGI.ZedTimeRemaining > 0.f && KillersPerk != none && KillersPerk.GetZedTimeExtensions( KFPC.GetLevel() ) > MyKFGI.ZedTimeExtensionsUsed)
|
if (MyKFGI.ZedTimeRemaining > 0.f && KillersPerk != None && KillersPerk.GetZedTimeExtensions(KFPC.GetLevel() ) > MyKFGI.ZedTimeExtensionsUsed)
|
||||||
{
|
{
|
||||||
MyKFGI.DramaticEvent(1.0);
|
MyKFGI.DramaticEvent(1.0);
|
||||||
MyKFGI.ZedTimeExtensionsUsed++;
|
MyKFGI.ZedTimeExtensionsUsed++;
|
||||||
@ -631,8 +637,10 @@ function ScoreKill(Controller Killer, Controller Killed)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ExtPlayerController(Killed) != None)
|
ExtPC = ExtPlayerController(Killed);
|
||||||
CheckPerkChange(ExtPlayerController(Killed));
|
if (ExtPC != None)
|
||||||
|
CheckPerkChange(ExtPC);
|
||||||
|
|
||||||
if (NextMutator != None)
|
if (NextMutator != None)
|
||||||
NextMutator.ScoreKill(Killer, Killed);
|
NextMutator.ScoreKill(Killer, Killed);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user