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