Core.Object | +--Engine.Actor | +--Engine.Info | +--Engine.PotentialClimbWatcher
simulated
Tick(float DeltaTime)
00001 class PotentialClimbWatcher extends Info 00002 native; 00003 00004 simulated function Tick(float DeltaTime) 00005 { 00006 local rotator PawnRot; 00007 local LadderVolume L; 00008 local bool bFound; 00009 00010 if ( (Owner == None) || Owner.bDeleteMe || (Owner.Physics == PHYS_Ladder) 00011 || (Pawn(Owner).Controller == None) || Level.Game.bGameEnded ) 00012 { 00013 destroy(); 00014 return; 00015 } 00016 00017 PawnRot = Owner.Rotation; 00018 PawnRot.Pitch = 0; 00019 ForEach Owner.TouchingActors(class'LadderVolume', L) 00020 if ( L.Encompasses(Owner) ) 00021 { 00022 if ( (vector(PawnRot) Dot L.LookDir) > 0.9 ) 00023 { 00024 // Log("LADDER PotentialClimbWatcher, OnlyOneHandFree="$Pawn(Owner).bHaveOnlyOneHandFree); 00025 if ( Pawn(Owner).bHaveOnlyOneHandFree ) 00026 Pawn(Owner).YouCantClimb(); 00027 else 00028 { 00029 Pawn(Owner).ClimbLadder(L); 00030 destroy(); 00031 return; 00032 } 00033 } 00034 else 00035 bFound = true; 00036 } 00037 00038 if ( !bFound ) 00039 destroy(); 00040 } 00041 00042 defaultproperties 00043 { 00044 }