Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

BonusPack.MutLastManStanding


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
// ====================================================================
//  Class: BonusPack.MutLastManStanding
//
//	Used to remove weapons from the level.
//
//  Written by James Golding
//  (c) 2002, Epic Games, Inc.  All Rights Reserved
// ====================================================================

class MutLastManStanding extends DMMutator
    HideDropDown
    CacheExempt;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
    local xLastManStandingGame LMSGame;

    LMSGame = xLastManStandingGame(Level.Game);

    if(LMSGame == None)
    {
        Log("Should only use MutLastManStanding with xLastManStandingGame game type.");
        bSuperRelevant = 0;
        return true;
    }

    // Remove conventional weapon pickups. Leave super weapons, all ammo etc.
    if ( Other.IsA('Pickup') )
    {
        if (!LMSGame.bAllowPickups)
            return !Level.bStartup;

        if (Other.IsA('AdrenalinePickup') && !LMSGame.bAllowAdrenaline)
            return false;

        if( Other.IsA('WeaponPickup') )
        {
            if( LMSGame.bAllowSuperweapons && (Other.IsA('PainterPickup') || Other.IsA('RedeemerPickup')) )
            {
                bSuperRelevant = 0;
                return true;
            }
            else
                return !Level.bStartup;
        }
        else
        {
            bSuperRelevant = 0;
            return true;
        }
    }

    // Hide all weapon bases apart from super weapons
    if ( Other.IsA('xPickupBase') )
    {
        if ( Other.IsA('xWeaponBase') )
        {
            if( LMSGame.bAllowSuperweapons && (xWeaponBase(Other).WeaponType == class'Painter' || xWeaponBase(Other).WeaponType == class'Redeemer') )
                Other.bHidden = false;
            else
                Other.bHidden = true;
        }
        else if (!LMSGame.bAllowPickups)
            Other.bHidden = true;

    }

    bSuperRelevant = 0;
    return true;
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:50.000 - Creation time: Mo 16.4.2007 11:20:50.328 - Created with UnCodeX