RuneI
Class WallMark

source: c:\runehov\RuneI\Classes\WallMark.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Decal
         |
         +--RuneI.WallMark
Direct Known Subclasses:DecalChar, DecalSlash

class WallMark
extends Engine.Decal

//============================================================================= // WallMark. //=============================================================================
Variables
 bStartedLife, bImportant


Function Summary
 
simulated
PostBeginPlay()
 
simulated
Timer()



Source Code


00001	//=============================================================================
00002	// WallMark.
00003	//=============================================================================
00004	class WallMark extends Decal;
00005	
00006	
00007	var bool bAttached, bStartedLife, bImportant;
00008	
00009	simulated function PostBeginPlay()
00010	{
00011		Super.PostBeginPlay();
00012		SetTimer(1.0, false);
00013	//	DrawScale=RandRange(0.5, 1.7);
00014	}
00015	
00016	simulated function Timer()
00017	{
00018		// Check for nearby players, if none then destroy self
00019	
00020		if ( !bAttached )
00021		{
00022			Destroy();
00023			return;
00024		}
00025	
00026		if ( !bStartedLife )
00027		{
00028			RemoteRole = ROLE_None;
00029			bStartedLife = true;
00030			if ( Level.bDropDetail )
00031				SetTimer(5.0 + 2 * FRand(), false);
00032			else
00033				SetTimer(18.0 + 5 * FRand(), false);
00034			return;
00035		}
00036		if ( Level.bDropDetail && (MultiDecalLevel < 6) )
00037		{
00038			if ( (Level.TimeSeconds - LastRenderedTime > 0.35)
00039				|| (!bImportant && (FRand() < 0.2)) )
00040				Destroy();
00041			else
00042			{
00043				SetTimer(1.0, true);
00044				return;
00045			}
00046		}
00047		else if ( Level.TimeSeconds - LastRenderedTime < 1 )
00048		{
00049			SetTimer(5.0, true);
00050			return;
00051		}
00052		Destroy();
00053	}
00054	
00055	defaultproperties
00056	{
00057	     bAttached=True
00058	     Style=STY_Modulated
00059	     Texture=Texture'BloodFX.blood01_b'
00060	}

End Source Code