RuneI
Class TTongue

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

class TTongue
extends RuneI.LimbWeapon

//============================================================================= // TTongue. //=============================================================================
Variables
 vector OldPos


Function Summary
 
simulated
Debug(Canvas canvas, int mode)
 void SpawnBloodSpray(vector HitLoc, vector HitNorm, EMatterType matter)
 
simulated
Tick(float DeltaTime)
 void WeaponFire(int SwingCount)



Source Code


00001	//=============================================================================
00002	// TTongue.
00003	//=============================================================================
00004	class TTongue expands LimbWeapon;
00005	
00006	var(Dynamics) float Dampening;
00007	var(Dynamics) int	RotAngle;
00008	var(Dynamics) float	AccelMag;
00009	var vector OldPos;
00010	
00011	simulated event GetAccelJointParms(int joint, out float DampFactor, out float RotThreshold)
00012	{
00013		DampFactor = Dampening;
00014		RotThreshold = RotAngle;
00015	}
00016	
00017	simulated event float GetAccelJointMagnitude(int joint)
00018	{
00019		return AccelMag;
00020	}
00021	
00022	simulated function Tick(float DeltaTime)
00023	{
00024		local vector vel;
00025	
00026		if (Owner != None)
00027		{
00028			OldPos = GetJointPos(5);
00029	
00030			if (VSize(Owner.Velocity) > 50)
00031			{
00032				vel = -Owner.Velocity*0.2;
00033				ApplyJointForce(2, vel);
00034				ApplyJointForce(3, vel);
00035			}
00036		}
00037	}
00038	
00039	function SpawnBloodSpray(vector HitLoc, vector HitNorm, EMatterType matter)
00040	{
00041	}
00042	
00043	function WeaponFire(int SwingCount)
00044	{
00045		local vector vel;
00046	
00047		vel = Normal(GetJointPos(5)-OldPos)*500;
00048		ApplyJointForce(2, vel);
00049		ApplyJointForce(3, vel);
00050		ApplyJointForce(4, vel);
00051	}
00052	
00053	simulated function Debug(Canvas canvas, int mode)
00054	{
00055		Super.Debug(canvas, mode);
00056		
00057		Canvas.DrawText("Dynamics:");
00058		Canvas.CurY -= 8;
00059		Canvas.DrawText(" Dampening:   "$Dampening);
00060		Canvas.CurY -= 8;
00061		Canvas.DrawText(" RotAngle:    "$RotAngle);
00062		Canvas.CurY -= 8;
00063		Canvas.DrawText(" AccelMag:    "$AccelMag);
00064		Canvas.CurY -= 8;
00065	}
00066	
00067	defaultproperties
00068	{
00069	     Dampening=0.005000
00070	     RotAngle=4000
00071	     AccelMag=500.000000
00072	     DrawScale=2.500000
00073	     Skeletal=SkelModel'objects.TubeTongue'
00074	     SkelGroupSkins(1)=Texture'creatures.Strikerstriker'
00075	}

End Source Code