RuneI
Class Tree1

source: c:\runehov\RuneI\Classes\tree1.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decoration
         |
         +--RuneI.DecorationRune
            |
            +--RuneI.Plants
               |
               +--RuneI.Tree1
Direct Known Subclasses:None

class Tree1
extends RuneI.Plants

//============================================================================= // Tree1. //=============================================================================

Function Summary
 bool JointDamaged(int Damage, Pawn Instigator, vector HitLoc, vector Momentum, name DamageType, int joint)
 
simulated
JointTouchedBy(Actor Other, int joint)



Source Code


00001	//=============================================================================
00002	// Tree1.
00003	//=============================================================================
00004	class Tree1 expands Plants;
00005	
00006	
00007	simulated event GetAccelJointParms(int joint, out float DampFactor, out float RotThreshold)
00008	{
00009		DampFactor = 0.025;
00010		RotThreshold = 8000;
00011	}
00012	
00013	simulated event float GetAccelJointMagnitude(int joint)
00014	{
00015		return 10000;
00016	}
00017	
00018	function bool JointDamaged(int Damage, Pawn Instigator, vector HitLoc, vector Momentum, name DamageType, int joint)
00019	{
00020		ApplyJointForce(joint, Momentum);
00021		return true;
00022	}
00023	
00024	simulated function JointTouchedBy(actor Other, int joint)
00025	{
00026		local vector vel;
00027	//local rotator r;
00028		local int j;
00029	
00030	/*
00031		// This to test grav points
00032		for (j=0; j<NumJoints(); j++)
00033		{
00034			if ((JointFlags[j] & JOINT_FLAG_ACCELERATIVE)!=0)
00035			{
00036				JointFlags[j] = JointFlags[j] & ~JOINT_FLAG_ACCELERATIVE;
00037				JointFlags[j] = JointFlags[j] | JOINT_FLAG_GRAVJOINT;
00038			}
00039		}
00040	*/
00041	
00042		vel = Other.Velocity;
00043		ApplyJointForce(joint, vel);
00044	//	r.Pitch = 0;
00045	//	r.Yaw = 5000;
00046	//	r.Roll = 0;
00047	//	ApplyJointTorque(joint, r);
00048	//	slog(Other.Name$" touched my "$GetJointName(joint)$" :"$r);
00049	}
00050	
00051	defaultproperties
00052	{
00053	     bStasis=False
00054	     CollisionRadius=5.000000
00055	     CollisionHeight=48.000000
00056	     Skeletal=SkelModel'plants.Tree'
00057	}

End Source Code