Mirror Friendly Fire Mutator. Мутатор зеркальный урон

Mirror Friendly Fire Mutator. Мутатор зеркальный урон

  • Тема закрыта
  • Вы не можете ответить в тему

Mirror Friendly Fire Mutator. Мутатор зеркальный урон Mirror Friendly Fire Mutator. Мутатор зеркальный урон ffmut ffRules

Geekrainian #1

    • Группа: Администратор
    • Сообщений: 800

    Отправлено:

    Mirror Friendly Fire Mutator. Мутатор зеркальный урон

    ffmut

    class ffmut extends Mutator config (REvengeFF);
    function PostBeginPlay()
    {
        local GameRules G;
        // Change the overall speed at which karma is evolved for in the level.
    
        //settimer(10.0,true);
        super.PostBeginPlay();
        G = spawn(class'ffRules');
    
        if (Level.Game.GameRulesModifiers == None)
            Level.Game.GameRulesModifiers = G;
        else
            Level.Game.GameRulesModifiers.AddGameRules(G);
    }
    defaultproperties
    {
        GroupName="KF-Dude"
        FriendlyName="FF REvenge "
        Description="when you shoot somebody on a friendlyfire server you get hurt."
    }

    ffRules

    class ffRules extends GameRules;
    function int NetDamage(int OriginalDamage, int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType )
    {
        if (injured.IsA('kfhumanpawn') && instigatedBy.IsA('kfhumanpawn') && injured != instigatedBy)
        {
            instigatedBy.TakeDamage(Damage, instigatedBy, hitlocation, Momentum, DamageType);
    
            Damage = 0;
    
            return Damage;
        }
    }
    defaultproperties
    {
    }
    Назад