RuneI
Class Floater

source: c:\runehov\RuneI\Classes\Floater.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decoration
         |
         +--RuneI.DecorationRune
            |
            +--RuneI.Floater
Direct Known Subclasses:IceChunk, LavaChunk, Raft

class Floater
extends RuneI.DecorationRune

//============================================================================= // Floater. //=============================================================================
Variables
 vector ApplyVelocity
           Used to re-apply velocity (hack)


Function Summary
 void Bump(Actor Other)
 
simulated
JointTouchedBy(Actor Other, int joint)
     
/*
 void Tick(float DeltaSeconds)



Source Code


00001	//=============================================================================
00002	// Floater.
00003	//=============================================================================
00004	class Floater expands DecorationRune
00005		abstract;
00006	
00007	
00008	var vector ApplyVelocity;	// Used to re-apply velocity (hack)
00009	
00010	
00011	simulated event GetSpringJointParms(int joint, out float DampFactor, out float SpringConstant, out vector SpringThreshold)
00012	{
00013		DampFactor = 2;
00014		SpringConstant = 50;
00015		SpringThreshold = vect(15,15,100);
00016	}
00017	
00018	function Bump(actor Other)
00019	{
00020		local vector vel2D;
00021		vel2D = Other.Velocity;
00022		vel2D.Z = 0;
00023		SetPhysics(PHYS_Falling);
00024		Velocity = vel2D;
00025		ApplyVelocity = vel2D;
00026	}
00027	
00028	function Tick(float DeltaSeconds)
00029	{
00030		if (ApplyVelocity==vect(0,0,0))
00031			return;
00032		if (Velocity==vect(0,0,0))
00033		{
00034			ApplyVelocity=Velocity;
00035			return;
00036		}
00037		Velocity = ApplyVelocity;
00038	}
00039	
00040	/*
00041	simulated function JointTouchedBy(actor Other, int joint)
00042	{
00043		if (Other.Base != self)
00044			ApplyJointForce(joint, vect(0,0,1)*Other.Velocity.Z);
00045	}
00046	*/
00047	
00048	defaultproperties
00049	{
00050	     bStatic=False
00051	     bStasis=False
00052	     DrawType=DT_SkeletalMesh
00053	     CollisionRadius=48.000000
00054	     CollisionHeight=18.000000
00055	     bCollideActors=True
00056	     bCollideWorld=True
00057	     bBlockActors=True
00058	     bBlockPlayers=True
00059	     bJointsBlock=True
00060	     bJointsTouch=True
00061	     Mass=1000.000000
00062	     Buoyancy=1200.000000
00063	     bNoSurfaceBob=True
00064	}

End Source Code