I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE3:UTWeaponPawn (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 09:11, 17 May 2008 by Wormbo (Talk | contribs) (Auto-generated page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT3 Object >> Actor >> Pawn >> Vehicle >> SVehicle >> UTVehicleBase >> UTWeaponPawn
Package: 
UTGame
Direct subclass:
UTClientSideWeaponPawn
This class in other games:
UDK

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties[edit]

MySeatIndex[edit]

Type: int

Modifiers: repnotify

An index in to the Seats array of the vehicle housing this WeaponPawn. It is replicated

Default value: -1

MyVehicle[edit]

Type: UTVehicle

Modifiers: repnotify

MyVehicle points to the vehicle that houses this WeaponPawn and is replicated

MyVehicleWeapon[edit]

Type: UTVehicleWeapon

Modifiers: repnotify

MyVehicleWeapon points to the weapon assoicated with this WeaponPawn and is replcated

Default values[edit]

Property Value
BaseEyeHeight 180.0
bCollideActors False
bCollideWorld False
bFollowLookDir True
bIgnoreBaseRotation True
bOnlyRelevantToOwner True
bProjTarget False
bStationary True
bTurnInPlace True
EyeHeight 180.0
InventoryManagerClass Class'UTGame.UTInventoryManager'
Physics PHYS_None
StayUprightConstraintInstance RB_ConstraintInstance'UTGame.Default__UTWeaponPawn:MyStayUprightConstraintInstance'
StayUprightConstraintSetup RB_StayUprightSetup'UTGame.Default__UTWeaponPawn:MyStayUprightSetup'

Subobjects[edit]

CollisionCylinder[edit]

Class: Engine.CylinderComponent

Inherits from: UTVehicleBase.CollisionCylinder

Property Value
BlockActors False
BlockNonZeroExtent False
BlockZeroExtent False
CollideActors False
CollisionHeight 0.0
CollisionRadius 0.0

MyStayUprightConstraintInstance[edit]

Class: Engine.RB_ConstraintInstance

Inherits from: UTVehicleBase.MyStayUprightConstraintInstance

No new values.

MyStayUprightSetup[edit]

Class: Engine.RB_StayUprightSetup

Inherits from: UTVehicleBase.MyStayUprightSetup

No new values.

SVehicleMesh[edit]

Class: Engine.SkeletalMeshComponent

Inherits from: UTVehicleBase.SVehicleMesh

No new values.

Functions[edit]

Exec functions[edit]

EditUDmgFX[edit]

exec function EditUDmgFX (optional int Index)


FixedView[edit]

exec function FixedView (string VisibleMeshes)


Native functions[edit]

GetTargetLocation[edit]

simulated native function Object.Vector GetTargetLocation (optional Actor RequestedBy, optional bool bRequestAlternateLoc) const

Overrides: Vehicle.GetTargetLocation

(Description copied from Vehicle.GetTargetLocation)


Returns:

Figure out who we are targetting.

Events[edit]

BaseChange[edit]

singular event BaseChange ()

Overrides: Pawn.BaseChange

Event called after actor's base changes.

DriverLeave[edit]

event bool DriverLeave (bool bForceLeave)

Overrides: Vehicle.DriverLeave

Called from the Controller when player wants to get out.

HoldGameObject[edit]

simulated event HoldGameObject (UTCarriedObject GameObj)

Overrides: UTVehicleBase.HoldGameObject

(Description copied from UTVehicleBase.HoldGameObject)
HoldGameObject() Attach GameObject to mesh.

Parameters:

  • GameObj - Game object to hold

ReplicatedEvent[edit]

simulated event ReplicatedEvent (name VarName)

Overrides: Vehicle.ReplicatedEvent

We use NetNotify to signal that critical data has been replicated. when the Vehicle, Weapon and SeatIndex have all arrived, we setup ourself up locally.

Parameters:

  • VarName - Name of the variable replicated

Other instance functions[edit]

AddVelocity[edit]

function AddVelocity (Object.Vector NewVelocity, Object.Vector HitLocation, class<DamageTypedamageType, optional Actor.TraceHitInfo HitInfo)

Overrides: SVehicle.AddVelocity


AdjustCameraScale[edit]

simulated function AdjustCameraScale (bool bIn)

Overrides: Pawn.AdjustCameraScale

moves the camera in or out

Parameters:

  • bIn - If true, we should zoom the camera in

ApplyWeaponEffects[edit]

simulated function ApplyWeaponEffects (int OverlayFlags, optional int SeatIndex)

Overrides: UTVehicleBase.ApplyWeaponEffects

applies weapon effects based on the passed in bitfield

AttachDriver[edit]

simulated function AttachDriver (Pawn P)

Overrides: Vehicle.AttachDriver

Attach the Driver to the vehicle. If he's visible, find him a place, otherwhise hind him

Parameters:

  • P - the Pawn the attach

CalcCamera[edit]

simulated function bool CalcCamera (float fDeltaTime, out Object.Vector out_CamLoc, out Object.Rotator out_CamRot, out float out_FOV)

Overrides: SVehicle.CalcCamera

Caculates the Camera position. WeaponPawn's forward this to their vehicle

Parameters:

  • fDeltatime - How long since the last calculation
  • out_CamLoc - The final camera location (out)
  • out_CamRot - The final camera rotation (out)
  • out_FOV - The final FOV to use (out)

ClearFlashCount[edit]

simulated function ClearFlashCount (Weapon Who)

Overrides: Pawn.ClearFlashCount

We need to pass ClearFlashCount calls to the controlling vehicle

ClearFlashLocation[edit]

simulated function ClearFlashLocation (Weapon Who)

Overrides: Pawn.ClearFlashLocation

We need to pass ClearFlashLocation calls to the controlling vehicle

Died[edit]

function bool Died (Controller Killer, class<DamageTypeDamageType, Object.Vector HitLocation)

Overrides: SVehicle.Died

(Description copied from Pawn.Died)
This pawn has died.

Parameters:

  • Killer - Who killed this pawn
  • DamageType - What killed it
  • HitLocation - Where did the hit occur

Returns:

true if allowed

DisplayDebug[edit]

simulated function DisplayDebug (HUD HUD, out float out_YL, out float out_YPos)

Overrides: SVehicle.DisplayDebug

General Debug information

DisplayHud[edit]

function DisplayHud (UTHUD Hud, Canvas Canvas, Object.Vector2D HudPOS, optional int SIndex)

Overrides: UTVehicleBase.DisplayHud

Pass HUD Rendering to the Vehicle

DoJump[edit]

function bool DoJump (bool bUpdating)

Overrides: Pawn.DoJump


DriverLeft[edit]

function DriverLeft ()

Overrides: UTVehicleBase.DriverLeft

Called when the driver leaves the WeaponPawn. We forward it along as a PassengerLeave call to the controlling vehicle.

DropToGround[edit]

function DropToGround ()

Overrides: Pawn.DropToGround


FaceRotation[edit]

simulated function FaceRotation (Object.Rotator NewRotation, float DeltaTime)

Overrides: Vehicle.FaceRotation

Vehicles ignore 'face rotation'.

GetCollisionRadius[edit]

simulated function float GetCollisionRadius ()

Overrides: Pawn.GetCollisionRadius

Returns:

the collision radius. In this case we return that of the vehicle if it exists

GetQuickPickCells[edit]

simulated function GetQuickPickCells (UTHUD Hud, out array<UTPawn.QuickPickCellCells, out int CurrentWeaponIndex)

Overrides: UTVehicleBase.GetQuickPickCells


GetVehicleDrivingStatName[edit]

function name GetVehicleDrivingStatName ()

Overrides: UTVehicleBase.GetVehicleDrivingStatName

Statistics gathering

IncrementFlashCount[edit]

simulated function IncrementFlashCount (Weapon Who, byte FireModeNum)

Overrides: Pawn.IncrementFlashCount

We need to pass IncreantFlashCount calls to the controlling vehicle

JumpOffPawn[edit]

function JumpOffPawn ()

Overrides: Pawn.JumpOffPawn


PlaceExitingDriver[edit]

function bool PlaceExitingDriver (optional Pawn ExitingDriver)

Overrides: Vehicle.PlaceExitingDriver

Called when the vehicle needs to place an exiting driver. Forward the call to the controlling vehicle

Parameters:

  • ExitingDriver - The pawn that is exiting

PossessedBy[edit]

function PossessedBy (Controller C, bool bVehicleTransition)

Overrides: Vehicle.PossessedBy

Called when the controller takes possession of the WeaponPawn. Upon Possession, make sure the weapon heads to the right state and set the eye height.

Parameters:

  • C - the controller taking posession
  • bVehicleTransition - Will be true if this the pawn is entering/leaving a vehicle

ProcessViewRotation[edit]

simulated function ProcessViewRotation (float DeltaTime, out Object.Rotator out_ViewRotation, out Object.Rotator out_DeltaRot)

Overrides: Pawn.ProcessViewRotation

(Description copied from Pawn.ProcessViewRotation)
Called from PlayerController UpdateRotation() -> ProcessViewRotation() to (pre)process player ViewRotation adds delta rot (player input), applies any limits and post-processing returns the final ViewRotation set on PlayerController

Parameters:

  • DeltaTime - time since last frame
  • ViewRotation - actual PlayerController view rotation
  • out_DeltaRot - delta rotation to be applied on ViewRotation. Represents player's input.

Returns:

processed ViewRotation to be set on PlayerController.

QuickPick[edit]

simulated function QuickPick (int Quad)

Overrides: UTVehicleBase.QuickPick


ServerAdjacentSeat[edit]

reliable server function ServerAdjacentSeat (int Direction, Controller C)

Overrides: UTVehicleBase.ServerAdjacentSeat

request change to adjacent vehicle seat

ServerChangeSeat[edit]

reliable server function ServerChangeSeat (int RequestedSeat)

Overrides: UTVehicleBase.ServerChangeSeat

(Description copied from UTVehicleBase.ServerChangeSeat)
Called when a client is requesting a seat change

Network: Server-Side

SetBaseEyeheight[edit]

simulated function SetBaseEyeheight ()

Overrides: Vehicle.SetBaseEyeheight

Set the Base Eye height. We override it here to pull it from the CameraEyeHeight variable of in the seat array

SetFiringMode[edit]

simulated function SetFiringMode (byte FiringModeNum)

Overrides: Pawn.SetFiringMode

Set firing mode replication for remote clients trigger update notification. Network: LocalPlayer and Server

SetFlashLocation[edit]

function SetFlashLocation (Weapon Who, byte FireModeNum, Object.Vector NewLoc)

Overrides: Pawn.SetFlashLocation

We need to pass SetFlashLocation calls to the controlling vehicle

SetMovementPhysics[edit]

function SetMovementPhysics ()

Overrides: Pawn.SetMovementPhysics


TooCloseToAttack[edit]

function bool TooCloseToAttack (Actor Other)

Overrides: Pawn.TooCloseToAttack