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

UT2004RPG.RPGShockProjectile


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
//Hack fix for Shock Rifle so bots will recognize that they can do combos with a RPGWeapon modifying a shock rifle
class RPGShockProjectile extends ShockProjectile;

event TakeDamage(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType)
{
    if (DamageType == ComboDamageType && RPGWeapon(EventInstigator.Weapon) != None)
        RPGWeapon(EventInstigator.Weapon).AdjustTargetDamage(Damage, self, HitLocation, Momentum, DamageType);

    Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType);
}

State WaitForCombo
{
    function Tick(float DeltaTime)
    {
        if ( (ComboTarget == None) || ComboTarget.bDeleteMe
            || (Instigator == None) || (ShockRifle(Instigator.Weapon) == None && (RPGWeapon(Instigator.Weapon) == None || ShockRifle(RPGWeapon(Instigator.Weapon).ModifiedWeapon) == None)) )
        {
            GotoState('');
            return;
        }

        if ( (VSize(ComboTarget.Location - Location) <= 0.5 * ComboRadius + ComboTarget.CollisionRadius)
            || ((Velocity Dot (ComboTarget.Location - Location)) <= 0) )
        {
            if (ShockRifle(Instigator.Weapon) != None)
                ShockRifle(Instigator.Weapon).DoCombo();
            else if (ShockRifle(RPGWeapon(Instigator.Weapon).ModifiedWeapon) != None && ShockRifle(RPGWeapon(Instigator.Weapon).ModifiedWeapon).bWaitForCombo)
            {
                ShockRifle(RPGWeapon(Instigator.Weapon).ModifiedWeapon).bWaitForCombo = false;
                Instigator.Weapon.StartFire(0);
            }
            GotoState('');
            return;
        }
    }
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Sat 15/7/2006 17:15:14.000 - Creation time: Wed 7/2/2007 19:16:50.343 - Created with UnCodeX