# SpatialFear.SFProjectile

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 |
    //=============================================================================
    // Spatial Fear
    // Class: SFProjectile
    // Descripton: Subclasses of Projectile
    // Implements the Spatial Fear projectile class.
    //
    // Author: Markus Nuebel
    //=============================================================================

    //class SFProjectile extends Razor2;
    class SFProjectile extends Projectile;

    var int Range;	// Range of projectile in UUs.
    var float WaterSplashScale; // Scale of water effect during zone impact
    var bool bHitWater;

    // Updates the range and lifespan of a projectile
    function setRange(int nRange)
    {
    	Range=nRange;
    	LifeSpan = Range/Speed;
    }

    // Handles a water impact of a projectile
    simulated function ZoneChange( Zoneinfo NewZone )
    {
    	local Splash w;

    	if (!NewZone.bWaterZone || bHitWater) Return;

    	if(NewZone.IsA('SFGravityZone'))
    		Return;

    	// Only spawn once
    	bHitWater = True;
    	if ( Level.NetMode != NM_DedicatedServer )
    	{
    		w = Spawn(class'Splash',,,,rot(16384,0,0));
    		w.DrawScale = WaterSplashScale;
    		w.RemoteRole = ROLE_None;
    	}
    	Velocity=0.6*Velocity;
    }

    defaultproperties
    {
         Range=2000
         WaterSplashScale=0.200000
    }

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX