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

JBToolbox2.JBSentinelWeapon


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
// ============================================================================
// JBSentinelWeapon
// Copyright 2004 by Blitz
// $Id: JBSentinelWeapon.uc,v 1.2 2011-01-03 12:13:39 wormbo Exp $
//
// The weapon that the sentinel uses.
// ============================================================================


class JBSentinelWeapon extends Weapon_Sentinel
  notplaceable cacheexempt;


// ============================================================================
// SetCustomProjectile
//
// Sets the proper variables in the WeaponFire class, so custom projectiles
// and their fancy stuff can be used.
// ============================================================================

function SetCustomProjectile(class<Projectile> ProjectileClass,
                             int Mode,
                             float FireRate,
                             Sound FireSound,
                             class<xEmitter> FlashEmitterClass,
                             class<xEmitter> SmokeEmitterClass)
{
  local FM_Sentinel_Fire SentinelFire;

  if (Mode < 0 || Mode >= NUM_FIRE_MODES)
    return;

  SentinelFire = FM_Sentinel_Fire(FireMode[Mode]);

  if (SentinelFire != None) {
    if (ProjectileClass != None) {
      SentinelFire.TeamProjectileClasses[0] = ProjectileClass;
      SentinelFire.TeamProjectileClasses[1] = ProjectileClass;
    }

    if (FireRate > 0.0)
      SentinelFire.FireRate = FireRate;

    SentinelFire.FireSound         = FireSound;
    SentinelFire.FlashEmitterClass = FlashEmitterClass;
    SentinelFire.SmokeEmitterClass = SmokeEmitterClass;
  }
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mo 3.1.2011 14:13:40.000 - Creation time: Do 14.8.2014 09:58:43.059 - Created with UnCodeX