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

UTClassic.MutUTClassic


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
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
class MutUTClassic extends Mutator;

var class<Weapon> OriginalClasses[8];
var class<Weapon> ReplacementClasses[8];
var config bool bCanDoubleJump;
var config bool bCanWallDodge;
var config bool bCanDodgeDoubleJump;
var config bool bModifyWeaponDamage;
var config bool bClassicTranslocator;
var localized string DJString, WDString, DDJString, DJHelp, WDHelp, DDJHelp, WeapString, WeapHelp, TranslocString, TranslocHelp;

function PostBeginPlay()
{
    local GameRules G;

    Super.PostBeginPlay();
    if ( bModifyWeaponDamage )
    {
        G = spawn(class'UTClassicGameRules');
        if ( Level.Game.GameRulesModifiers == None )
            Level.Game.GameRulesModifiers = G;
        else
            Level.Game.GameRulesModifiers.AddGameRules(G);
    }
    Level.Game.bModViewShake = false;
}

function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
    local int i;

    bSuperRelevant = 0;
    if ( xPawn(Other) != None )
    {
        if ( !bCanDoubleJump )
        {
            xPawn(Other).MaxMultiJump = 0;
            xPawn(Other).MultiJumpRemaining = 0;
        }
        xPawn(Other).bCanWallDodge = bCanWallDodge;
        xPawn(Other).bCanDodgeDoubleJump = bCanDodgeDoubleJump;
        xPawn(Other).RequiredEquipment[1] = "UTClassic.ClassicShieldGun";
        if ( bClassicTranslocator && Deathmatch(Level.Game).AllowTransloc() )
            xPawn(Other).RequiredEquipment[2] = "UTClassic.ClassicTranslauncher";
    }
    else if ( xWeaponBase(Other) != None )
    {
        for ( i=0; i<8; i++ )
            if ( xWeaponBase(Other).WeaponType == OriginalClasses[i] )
            {
                xWeaponBase(Other).WeaponType = ReplacementClasses[i];
                return true;
            }
    }
    else if ( SniperAmmoPickup(Other) != None )
    {
        ReplaceWith( Other, "UTClassic.ClassicSniperAmmoPickup");
        return false;
    }
    else if ( bClassicTranslocator && (Translauncher(Other) != None) )
    {
        if ( ClassicTransLauncher(Other) == None )
            return false;
    }
    return true;
}

static function FillPlayInfo(PlayInfo PlayInfo)
{
    Super.FillPlayInfo(PlayInfo);

    PlayInfo.AddSetting(default.RulesGroup, "bCanDoubleJump", default.DJString, 0, 1, "Check");
    PlayInfo.AddSetting(default.RulesGroup, "bCanWallDodge", default.WDString, 0, 1, "Check");
    PlayInfo.AddSetting(default.RulesGroup, "bCanDodgeDoubleJump", default.DDJString, 0, 1, "Check");
    PlayInfo.AddSetting(default.RulesGroup, "bModifyWeaponDamage", default.WeapString, 0, 1, "Check");
    PlayInfo.AddSetting(default.RulesGroup, "bClassicTranslocator", default.TranslocString, 0, 1, "Check");
}

static event string GetDescriptionText(string PropName)
{
    switch (PropName)
    {
        case "bCanDoubleJump":  return default.DJHelp;
        case "bCanWallDodge":           return default.WDHelp;
        case "bCanDodgeDoubleJump":         return default.DDJHelp;
        case "bModifyWeaponDamage":         return default.WeapHelp;
        case "bClassicTranslocator":            return default.TranslocHelp;
    }

    return Super.GetDescriptionText(PropName);
}

defaultproperties
{
     OriginalClasses(0)=Class'XWeapons.FlakCannon'
     OriginalClasses(1)=Class'XWeapons.Minigun'
     OriginalClasses(2)=Class'XWeapons.ShockRifle'
     OriginalClasses(3)=Class'XWeapons.RocketLauncher'
     OriginalClasses(4)=Class'XWeapons.SniperRifle'
     OriginalClasses(5)=Class'XWeapons.BioRifle'
     OriginalClasses(6)=Class'XWeapons.Translauncher'
     OriginalClasses(7)=Class'XWeapons.ShieldGun'
     ReplacementClasses(0)=Class'UTClassic.ClassicFlakCannon'
     ReplacementClasses(1)=Class'UTClassic.ClassicMinigun'
     ReplacementClasses(2)=Class'UTClassic.ClassicShockRifle'
     ReplacementClasses(3)=Class'UTClassic.ClassicRocketLauncher'
     ReplacementClasses(4)=Class'UTClassic.ClassicSniperRifle'
     ReplacementClasses(5)=Class'UTClassic.ClassicBioRifle'
     ReplacementClasses(6)=Class'UTClassic.ClassicTranslauncher'
     ReplacementClasses(7)=Class'UTClassic.ClassicShieldGun'
     bCanDoubleJump=Wahr
     bCanWallDodge=Wahr
     bCanDodgeDoubleJump=Wahr
     bModifyWeaponDamage=Wahr
     bClassicTranslocator=Wahr
     DJString="Allow Double Jumping"
     WDString="Allow Wall Dodging"
     DDJString="Allow Dodge Double Jumping"
     DJHelp="If enabled, players can double jump at the peak of jumps."
     WDHelp="If enabled, players can dodge off walls."
     DDJHelp="If enabled, players can double jump at the peak of dodge jumps."
     WeapString="Modify Weapon Damage"
     WeapHelp="If enabled, weapons do more damage."
     TranslocString="Modify Translocator"
     TranslocHelp="If enabled, translocator recharges faster."
     GroupName="Arena"
     FriendlyName="UT Classic"
     Description="Classic UT style weapons and movement options."
}

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.375 - Created with UnCodeX