Mirror Friendly Fire Mutator. Mutator mirror damage

Mirror Friendly Fire Mutator. Mutator mirror damage

  • Topic closed
  • You cannot reply to this topic

Mirror Friendly Fire Mutator. Mutator mirror damage Mirror Friendly Fire Mutator. Mutator mirror damage ffmut ffRules

Geekrainian #1

    • Group: Admin
    • Posts: 800

    Posted:

    Mirror Friendly Fire Mutator. Mutator mirror damage

    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
    {
    }
    Back