Pipe Bombs Mutator. Мутатор взрыв взрывчатки при смерти
class PipeBombsMut extends Mutator;
function PostBeginPlay()
{
local PBGameRules pbRules;
if (pbRules == None)
pbRules = Spawn(class'PBGameRules');
Super.PostBeginPlay();
}
defaultproperties
{
GroupName="KF-CleanMap"
FriendlyName="PipeBombsMut"
Description="Destroys pipebombs after player death"
bAddToServerPackages=True
}
class PBGameRules extends GameRules;
function PostBeginPlay()
{
if (Level.Game.GameRulesModifiers == None)
Level.Game.GameRulesModifiers = Self;
else
Level.Game.GameRulesModifiers.AddGameRules(Self);
}
function AddGameRules(GameRules GR)
{
if (GR != Self)
Super.AddGameRules(GR);
}
function ScoreKill(Controller Killer, Controller Killed)
{
local PipeBombProjectile pb;
if (Killed.IsA('PlayerController'))
{
foreach DynamicActors(class'PipeBombProjectile', pb)
{
if (pb.Instigator != None &&
pb.Instigator.Controller != None &&
pb.Instigator.Controller == Killed)
{
pb.Explode(pb.Location, vect(0, 0, 0));
}
}
}
if (NextGameRules != None)
NextGameRules.ScoreKill(Killer, Killed);
}
Автор: Flame
Код для мутатора: PipeBombsMut.PipeBombsMut
Скомпилированная версия: https://yadi.sk/d/eQf_FqP_cjCFX