diff --git a/ServerExtMut/Classes/ServerExtMut.uc b/ServerExtMut/Classes/ServerExtMut.uc index c50b4ee..482fe3f 100644 --- a/ServerExtMut/Classes/ServerExtMut.uc +++ b/ServerExtMut/Classes/ServerExtMut.uc @@ -357,21 +357,91 @@ function AddMutator(Mutator M) else Super.AddMutator(M); } } + +function bool IsFromMod(Object O) +{ + local string PackageName; + + if( O == None ) + return false; + + PackageName = string(O.GetPackageName()); + if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0) + { + PackageName = string(O); + if( Len(PackageName)>1 && InStr(Caps(PackageName), "KF") == 0) + return false; + } + + return true; +} + function ScoreKill(Controller Killer, Controller Killed) { + local KFPawn_Monster KFM; + local int i, j; + local KFPlayerReplicationInfo DamagerKFPRI; + local float XP; + local KFPerk InstigatorPerk; + local bool cont; + local KFPlayerController KFPC; local ExtPerkManager KillersPerk; if( bRespawnCheck && Killed.bIsPlayer ) CheckRespawn(Killed); - if( KFPawn_Monster(Killed.Pawn)!=None && Killed.GetTeamNum()!=0 && Killer.bIsPlayer && Killer.GetTeamNum()==0 ) + KFM = KFPawn_Monster(Killed.Pawn); + if( KFM!=None && Killed.GetTeamNum()!=0 && Killer.bIsPlayer && Killer.GetTeamNum()==0 ) { if( ExtPlayerController(Killer)!=None && ExtPlayerController(Killer).ActivePerkManager!=None ) ExtPlayerController(Killer).ActivePerkManager.PlayerKilled(KFPawn_Monster(Killed.Pawn),LastKillDamageType); if( bKillMessages && Killer.PlayerReplicationInfo!=None ) BroadcastKillMessage(Killed.Pawn,Killer); - //else if( Killer!=None && Killer!=Killed && Killer.GetTeamNum()==0 && Ext_T_MonsterPRI(Killer.PlayerReplicationInfo)!=None ) - // BroadcastKillMessage(Killed.Pawn,Ext_T_MonsterPRI(Killer.PlayerReplicationInfo).OwnerController); + if( KFM.DamageHistory.Length > 0 ) + { + for( i = 0; i damageType, vector HitLocation) { @@ -429,8 +501,9 @@ final function GT_PlayerKilled( Controller Killer, Controller Killed, class damageType )