RuneI
Class NonStow

source: c:\runehov\RuneI\Classes\NonStow.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Weapon
            |
            +--RuneI.NonStow
Direct Known Subclasses:LimbWeapon, Torch, SarkBall

class NonStow
extends Engine.Weapon

//============================================================================= // NonStow. //=============================================================================

Function Summary
 int GetUsePriority()
     
//============================================================================
//
// GetUsePriority
//
// Returns the priority of the weapon, lower is better
//============================================================================
 void SpawnBloodSpray(vector HitLoc, vector HitNorm, EMatterType matter)
 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	// NonStow.
00003	//=============================================================================
00004	class NonStow expands Weapon
00005		abstract;
00006	
00007	//============================================================================
00008	//
00009	// GetUsePriority
00010	//
00011	// Returns the priority of the weapon, lower is better
00012	//============================================================================
00013	
00014	function int GetUsePriority()
00015	{
00016		return(6);
00017	}
00018	
00019	//=============================================================================
00020	//
00021	// SpawnHitEffect
00022	//
00023	// Spawns an effect based upon what was struck
00024	//=============================================================================
00025	function SpawnHitEffect(vector HitLoc, vector HitNorm, int LowMask, int HighMask, Actor HitActor)
00026	{	
00027		local int i,j;
00028		local EMatterType matter;
00029	
00030		// Determine what kind of matter was hit
00031		if ((HitActor.Skeletal != None) && (LowMask!=0 || HighMask!=0))
00032		{
00033			for (j=0; j<HitActor.NumJoints(); j++)
00034			{
00035				if (((j <  32) && ((LowMask  & (1 <<  j      )) != 0)) ||
00036					((j >= 32) && (j < 64) && ((HighMask & (1 << (j - 32))) != 0)) )
00037				{	// Joint j was hit
00038					matter = HitActor.MatterForJoint(j);
00039					break;
00040				}
00041			}
00042		}
00043		else if(HitActor.IsA('LevelInfo'))
00044		{	
00045			matter = HitActor.MatterTrace(HitLoc, Owner.Location, WeaponSweepExtent);
00046		}
00047		else
00048		{
00049			matter = HitActor.MatterForJoint(0);
00050		}
00051	
00052		// Create effects
00053		PlayHitMatterSound(matter);
00054	
00055		SpawnBloodSpray(HitLoc, HitNorm, matter);
00056	}
00057	
00058	function SpawnBloodSpray(vector HitLoc, vector HitNorm, EMatterType matter);
00059	
00060	defaultproperties
00061	{
00062	     MeleeType=MELEE_NON_STOW
00063	     ThrownSoundLOOP=Sound'WeaponsSnd.Throws.throw02L'
00064	     A_Idle=T_OUTIdle
00065	     A_Forward=S1_Walk
00066	     A_Backward=weapon1_backup
00067	     A_Forward45Right=S1_Walk45Right
00068	     A_Forward45Left=S1_Walk45Left
00069	     A_Backward45Right=weapon1_backup45Right
00070	     A_Backward45Left=weapon1_backup45Left
00071	     A_StrafeRight=StrafeRight
00072	     A_StrafeLeft=StrafeLeft
00073	     A_Jump=MOV_ALL_jump1_AA0S
00074	     A_ForwardAttack=LegsTest
00075	     A_AttackA=S1_attackA
00076	     A_AttackAReturn=S1_attackAreturn
00077	     A_AttackStandA=S1_StandingAttackA
00078	     A_AttackStandAReturn=S1_StandingAttackAReturn
00079	     A_AttackBackupA=H3_BackupAttackA
00080	     A_AttackBackupAReturn=H3_BackupAttackAReturn
00081	     A_AttackStrafeRight=S1_StrafeRightAttack
00082	     A_AttackStrafeLeft=S1_StrafeLeftAttack
00083	     A_JumpAttack=OneHandJumpAttack
00084	     A_Throw=H3_throw
00085	     A_Defend=H3_DefendTO
00086	     A_DefendIdle=H3_DefendIdle
00087	     A_PainFront=Onehand_painRight
00088	     A_PainBack=Onehand_painRight
00089	     A_PainLeft=Onehand_painLeft
00090	     A_PainRight=Onehand_painRight
00091	     A_PickupGroundLeft=PickupGroundLeft
00092	     A_PickupHighLeft=PickupHighLeft
00093	     A_Taunt=S3_taunt
00094	     A_LeverTrigger=T_OUTLeverTrigger
00095	     RespawnTime=30.000000
00096	     PickupSound=Sound'OtherSnd.Pickups.grab02'
00097	     RespawnSound=Sound'OtherSnd.Respawns.respawn01'
00098	     PickupMessageClass=Class'RuneI.PickupMessage'
00099	     Mass=12.000000
00100	}

End Source Code