RuneI
Class TubestrikerTongue

source: c:\runehov\RuneI\Classes\TubeStrikerTongue.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Weapon
            |
            +--RuneI.InvisibleWeapon
               |
               +--RuneI.TubestrikerTongue
Direct Known Subclasses:None

class TubestrikerTongue
extends RuneI.InvisibleWeapon

//============================================================================= // TubestrikerTongue. //=============================================================================

Function Summary
 void SpawnHitEffect(vector HitLoc, vector HitNorm, int LowMask, int HighMask, Actor HitActor)
     
//=============================================================================
//
// SpawnHitEffect
//
// Spawns an effect based upon what was struck
//=============================================================================



Source Code


00001	//=============================================================================
00002	// TubestrikerTongue.
00003	//=============================================================================
00004	class TubestrikerTongue expands InvisibleWeapon;
00005	
00006	
00007	
00008	//=============================================================================
00009	//
00010	// SpawnHitEffect
00011	//
00012	// Spawns an effect based upon what was struck
00013	//=============================================================================
00014	function SpawnHitEffect(vector HitLoc, vector HitNorm, int LowMask, int HighMask, Actor HitActor)
00015	{	
00016		local int i,j;
00017		local EMatterType matter;
00018	
00019		// Determine what kind of matter was hit
00020		if ((HitActor.Skeletal != None) && (LowMask!=0 || HighMask!=0))
00021		{
00022			for (j=0; j<HitActor.NumJoints(); j++)
00023			{
00024				if (((j <  32) && ((LowMask  & (1 <<  j      )) != 0)) ||
00025					((j >= 32) && (j < 64) && ((HighMask & (1 << (j - 32))) != 0)) )
00026				{	// Joint j was hit
00027					matter = HitActor.MatterForJoint(j);
00028					break;
00029				}
00030			}
00031		}
00032		else if(HitActor.IsA('LevelInfo'))
00033		{	
00034			matter = HitActor.MatterTrace(HitLoc, Owner.Location, WeaponSweepExtent);
00035		}
00036		else
00037		{
00038			matter = HitActor.MatterForJoint(0);
00039		}
00040	
00041		if (HitActor.IsA('Shield'))
00042			FinishAttack();
00043	
00044		// Create effects
00045		PlayHitMatterSound(matter);
00046	
00047		switch(matter)
00048		{
00049			case MATTER_FLESH:
00050				if(HitActor.IsA('Sark') || HitActor.IsA('SarkRagnar'))
00051					Spawn(class'SarkBloodMist',,, HitLoc, rotator(HitNorm)); // Sark blood
00052				else
00053					Spawn(class'BloodMist',,, HitLoc, rotator(HitNorm));
00054				break;
00055			case MATTER_WOOD:
00056				break;
00057			case MATTER_STONE:
00058				Spawn(class'HitStone',,, HitLoc, rotator(HitNorm));
00059				break;
00060			case MATTER_METAL:
00061				break;
00062			case MATTER_EARTH:
00063				break;
00064			case MATTER_BREAKABLEWOOD:
00065				break;
00066			case MATTER_BREAKABLESTONE:
00067				break;
00068			case MATTER_WEAPON:
00069				break;
00070			case MATTER_SHIELD:
00071				break;
00072			case MATTER_ICE:
00073				break;
00074			case MATTER_WATER:
00075				break;
00076		}
00077	}
00078	
00079	defaultproperties
00080	{
00081	     DamageType=Sever
00082	     ThroughAir(0)=Sound'CreaturesSnd.TubeStriker.tubebite01'
00083	     ThroughAir(1)=Sound'CreaturesSnd.TubeStriker.tubebite02'
00084	     ThroughAir(2)=Sound'CreaturesSnd.TubeStriker.tubebite06'
00085	     HitFlesh(0)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00086	     HitFlesh(1)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00087	     HitWood(0)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00088	     HitWood(1)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00089	     HitStone(0)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00090	     HitStone(1)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00091	     HitStone(2)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00092	     HitMetal(0)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00093	     HitMetal(1)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00094	     HitMetal(2)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00095	     HitDirt(0)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00096	     HitDirt(1)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00097	     HitDirt(2)=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00098	     HitShield=Sound'WeaponsSnd.ImpWood.impactwood02'
00099	     HitBreakableWood=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00100	     HitBreakableStone=Sound'CreaturesSnd.Zombie.zombiearmimp01'
00101	     SheathSound=Sound'WeaponsSnd.Stows.stow05'
00102	     UnsheathSound=Sound'WeaponsSnd.Stows.stow06'
00103	     SwipeClass=Class'RuneI.WeaponSwipePurple'
00104	     DrawType=DT_SkeletalMesh
00105	     Skeletal=SkelModel'weapons.MechClaw'
00106	}

End Source Code