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

DeusEx.Ammo10mm


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
//=============================================================================
// Ammo10mm.
//=============================================================================
class Ammo10mm extends DeusExAmmo;

simulated function PreBeginPlay()
{
    Super.PreBeginPlay();

    // If this is a netgame, then override defaults
    if ( Level.NetMode != NM_StandAlone )
      AmmoAmount = 9;
}

function bool UseAmmo(int AmountNeeded)
{
    local vector offset, tempvec, X, Y, Z;
    local ShellCasing shell;
    local DeusExWeapon W;

    if (Super.UseAmmo(AmountNeeded))
    {
        GetAxes(Pawn(Owner).ViewRotation, X, Y, Z);
        offset = Owner.CollisionRadius * X + 0.3 * Owner.CollisionRadius * Y;
        tempvec = 0.8 * Owner.CollisionHeight * Z;
        offset.Z += tempvec.Z;

        // use silent shells if the weapon has been silenced
        W = DeusExWeapon(Pawn(Owner).Weapon);
      if ((DeusExMPGame(Level.Game) != None) && (!DeusExMPGame(Level.Game).bSpawnEffects))
      {
         shell = None;
      }
      else
      {
         if ((W != None) && ((W.NoiseLevel < 0.1) || W.bHasSilencer))
            shell = spawn(class'ShellCasingSilent',,, Owner.Location + offset);
         else
            shell = spawn(class'ShellCasing',,, Owner.Location + offset);
      }

        if (shell != None)
        {
            shell.Velocity = (FRand()*20+90) * Y + (10-FRand()*20) * X;
            shell.Velocity.Z = 0;
        }
        return True;
    }

    return False;
}

defaultproperties
{
     bShowInfo=True
     AmmoAmount=6
     MaxAmmo=150
     ItemName="10mm Ammo"
     ItemArticle="some"
     PickupViewMesh=LodMesh'DeusExItems.Ammo10mm'
     Icon=Texture'DeusExUI.Icons.BeltIconAmmo10mm'
     largeIcon=Texture'DeusExUI.Icons.LargeIconAmmo10mm'
     largeIconWidth=44
     largeIconHeight=31
     Description="With their combination of high stopping power and low recoil, pistols chambered for the 10mm round have become the sidearms of choice for paramilitary forces around the world."
     beltDescription="10MM AMMO"
     Mesh=LodMesh'DeusExItems.Ammo10mm'
     CollisionRadius=8.500000
     CollisionHeight=3.770000
     bCollideActors=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 8/11/2021 16:22:52.000 - Creation time: Mon 8/11/2021 16:31:22.398 - Created with UnCodeX