Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

OnslaughtBP.ONSMortarTargetBeam


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
//-----------------------------------------------------------
//
//-----------------------------------------------------------
class ONSMortarTargetBeam extends Actor;

var vector TargetLocation, ArtilleryLocation;
var float MoveSpeedFactor, MinMoveSpeed;
var bool bReticleActivated;

simulated function SetStatus(bool bStatus)
{
    if (bReticleActivated != bStatus)
    {
        bReticleActivated = bStatus;
        if (bReticleActivated)
            SetStaticMesh(StaticMesh'ONS-BPJW1.Target');
        else
            SetStaticMesh(StaticMesh'ONS-BPJW1.TargetNo');
    }
}

function Tick(float DeltaTime)
{
    local vector MoveDir;
    local float MoveDist;
    local float CurrentSpeed;
    local Rotator NewRotation;

    MoveDir = (TargetLocation + vect(0,0,100)) - Location;
    MoveDist = VSize(MoveDir);
    CurrentSpeed = FMax(MoveDist * MoveSpeedFactor, MinMoveSpeed);

    if (MoveDist > 50.0)
        SetLocation(Location + (Normal(MoveDir) * CurrentSpeed * DeltaTime));

    NewRotation = Rotator(Location - ArtilleryLocation);
    NewRotation.Pitch = 0;
    SetRotation(NewRotation);
}

defaultproperties
{
     MoveSpeedFactor=6.000000
     MinMoveSpeed=4000.000000
     bReticleActivated=True
     DrawType=DT_StaticMesh
     StaticMesh=StaticMesh'ONS-BPJW1.Meshes.Target'
     RemoteRole=ROLE_None
     DrawScale3D=(X=40.000000,Y=40.000000,Z=12.000000)
     AmbientGlow=254
     bUnlit=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: pr 5-2-2018 12:35:56.000 - Creation time: sk 18-3-2018 09:50:15.496 - Created with UnCodeX