RuneI
Class DiscardedHealth

source: c:\runehov\RuneI\Classes\DiscardedHealth.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Effects
         |
         +--Engine.Debris
            |
            +--RuneI.DiscardedHealth
Direct Known Subclasses:EatenLegBone, EatenLizard, EmptyStein, Fruit_core

class DiscardedHealth
extends Engine.Debris

//============================================================================= // DiscardedHealth. //=============================================================================

Function Summary
 vector DropVelocity(Pawn P)
 void InventorySpecial1()
 void InventorySpecial2()
 void InventorySpecial3()



Source Code


00001	//=============================================================================
00002	// DiscardedHealth.
00003	//=============================================================================
00004	class DiscardedHealth expands Debris;
00005	
00006	function InventorySpecial1()
00007	{
00008	}
00009	
00010	function InventorySpecial2()
00011	{ // Drop the refuse (bone or empty stein)
00012		local Pawn P;
00013		local actor junk;
00014	
00015		if(Owner == None)
00016			return;
00017			
00018		P = Pawn(Owner);
00019		junk = P.DetachActorFromJoint(P.JointNamed(P.WeaponJoint));
00020	
00021		if(junk != None)
00022		{	
00023			junk.Velocity = DropVelocity(P);
00024			junk.SetPhysics(PHYS_Falling);
00025			junk.bCollideWorld = true;
00026		}
00027	}
00028	
00029	function InventorySpecial3()
00030	{
00031	}
00032	
00033	function vector DropVelocity(Pawn P)
00034	{
00035		local vector X, Y, Z;
00036		local vector vel;
00037	
00038		GetAxes(P.Rotation, X, Y, Z);
00039		vel = -X * 150 + Y * 30 + vect(0, 0, 100);
00040	
00041		return(vel);
00042	}
00043	
00044	defaultproperties
00045	{
00046	}

End Source Code