RuneI
Class DarkShield

source: c:\runehov\RuneI\Classes\DarkShield.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Shield
            |
            +--RuneI.DarkShield
Direct Known Subclasses:None

class DarkShield
extends Engine.Shield

//============================================================================= // DarkShield. //=============================================================================

Function Summary
 void DestroyEffect()
     
//-----------------------------------------------------------------------------
//
// DestroyEffect
//
// Used when shield is destroyed
//-----------------------------------------------------------------------------
 void PlayHitSound(name DamageType)
     
//=============================================================================
//
// Sound Functions
//
//=============================================================================



Source Code


00001	//=============================================================================
00002	// DarkShield.
00003	//=============================================================================
00004	class DarkShield expands Shield;
00005	
00006	
00007	//-----------------------------------------------------------------------------
00008	//
00009	// DestroyEffect
00010	//
00011	// Used when shield is destroyed
00012	//-----------------------------------------------------------------------------
00013	function DestroyEffect()
00014	{
00015		local int i, numchunks, NumSourceGroups;
00016		local debris d;
00017		local debriscloud c;
00018		local vector loc;
00019		local float scale;
00020	
00021		// Spawn cloud
00022		c = Spawn(class'DebrisCloud');
00023		if(c != None)
00024			c.SetRadius(Max(CollisionRadius,CollisionHeight));
00025	
00026		// Spawn debris
00027		numchunks = Clamp(Mass/10, 2, 15);
00028	
00029		// Find appropriate size of chunks
00030		scale = (CollisionRadius*CollisionRadius*CollisionHeight) / (numchunks*500);
00031		scale = scale ** 0.3333333;
00032		for (NumSourceGroups=1; NumSourceGroups<16; NumSourceGroups++)
00033		{
00034			if (SkelGroupSkins[NumSourceGroups] == None)
00035				break;
00036		}
00037	
00038		for (i=0; i<numchunks; i++)
00039		{
00040			loc = Location;
00041			loc.X += (FRand()*2-1)*CollisionRadius;
00042			loc.Y += (FRand()*2-1)*CollisionRadius;
00043			loc.Z += (FRand()*2-1)*CollisionHeight;
00044			d = Spawn(class'debriswood',,,loc);
00045			if(d != None)
00046			{
00047				d.SetSize(scale);
00048				d.SetTexture(SkelGroupSkins[i%NumSourceGroups]);
00049	//			d.SetMomentum(Momentum);
00050			}
00051		}
00052	}
00053	
00054	
00055	//=============================================================================
00056	//
00057	// Sound Functions
00058	//
00059	//=============================================================================
00060	function PlayHitSound(name DamageType)
00061	{
00062	}
00063	
00064	defaultproperties
00065	{
00066	     Health=70
00067	     rating=2
00068	     DestroyedSound=Sound'WeaponsSnd.Shields.xtroy04'
00069	     PickupMessage="You bear a Dark Shield"
00070	     RespawnSound=Sound'OtherSnd.Respawns.respawn01'
00071	     DropSound=Sound'WeaponsSnd.Shields.xdrop04'
00072	     PickupMessageClass=Class'RuneI.PickupMessage'
00073	     LODCurve=LOD_CURVE_ULTRA_CONSERVATIVE
00074	     CollisionRadius=13.000000
00075	     CollisionHeight=3.000000
00076	     bCollideWorld=True
00077	     Mass=150.000000
00078	     Skeletal=SkelModel'weapons.DarkShield'
00079	     SkelGroupSkins(0)=Texture'weapons.DarkShielddviking_shield'
00080	     SkelGroupSkins(1)=Texture'weapons.DarkShielddviking_shield'
00081	}

End Source Code