I love the smell of UnrealEd crashing in the morning. – tarquin

Difference between revisions of "UE3:PlayerController (UDK)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (Reverted edits by Tongauaee (Talk) to last revision by Wormbo)
 
Line 230: Line 230:
 
==States==
 
==States==
 
See {{cl|PlayerController states}}.
 
See {{cl|PlayerController states}}.
 
// size == 0x44
 
struct FS_RECOIL_RESULT
 
{
 
int recoilState;           
 
float currentCrossVert;           
 
float expectCrossVert;           
 
float crossDecreasValue;           
 
float oldrCrossVert;         
 
float crossIncline;
 
float decline;         
 
int forceDir;
 
float impactIncreaseEye;     
 
float impactDecline; 
 
float impactSpinY;
 
float impactSpinZ;                                   
 
float currentDomValue;         
 
float movingValue;           
 
float movingValueForCrossHair;           
 
float spiny;         
 
float spinz;           
 
};
 
 
const FS_RECOIL_RESULT NoRecoil = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
 
void Cheats::NoRecoil( )
 
{
 
if(pPlayerController->Pawn != nullptr)
 
{
 
ASFPawn_Player* pSFPawn = (ASFPawn_Player*)pPlayerController->Pawn;
 
if(pSFPawn != nullptr)
 
{
 
/* *Pawn + 0xE78 */
 
pSFPawn->RecoilResult = RecoilNULL;
 
}
 
}
 
}
 

Latest revision as of 06:42, 14 May 2014

UDK Object >> Actor >> Controller >> PlayerController
Package: 
Engine
Implemented interfaces
Interface_NavigationHandle
Known classes within PlayerController:
CheatManager, DebugCameraInput, ForceFeedbackManager, PlayerInput, UTCheatManager
Direct subclasses:
Admin, DebugCameraController, GamePlayerController
This class in other games:
U2XMP, U2, UE2Runtime, UT2004, UT2003, UT3

PlayerController

PlayerControllers are used by human players to control pawns.

This is a built-in Unreal class and it shouldn't be modified. for the change in Possess().

Constants[edit]

MAXPOSITIONERRORSQUARED[edit]

Value: 3.0

MAXPOSITIONERRORSQUARED is the square of the max position error that is accepted (not corrected) in net play

MAXNEARZEROVELOCITYSQUARED[edit]

Value: 9.0

MAXNEARZEROVELOCITYSQUARED is the square of the max velocity that is considered zero (not corrected) in net play

MAXVEHICLEPOSITIONERRORSQUARED[edit]

Value: 900.0

MAXVEHICLEPOSITIONERRORSQUARED is the square of the max position error that is accepted (not corrected) in net play when driving a vehicle

CLIENTADJUSTUPDATECOST[edit]

Value: 180.0

CLIENTADJUSTUPDATECOST is the bandwidth cost in bytes of sending a client adjustment update. 180 is greater than the actual cost, but represents a tweaked value reserving enough bandwidth for other updates sent to the client. Increase this value to reduce client adjustment update frequency, or if the amount of data sent in the clientadjustment() call increases

MAXCLIENTUPDATEINTERVAL[edit]

Value: 0.25

MAXCLIENTUPDATEINTERVAL is the maximum time between movement updates from the client before the server forces an update.

Properties[edit]

Property group 'Camera'[edit]

PlayerCamera[edit]

Type: Camera

Modifiers: editinline

Camera associated with this Player Controller

Property group 'PlayerController'[edit]

PlayerInput[edit]

Type: PlayerInput

Modifiers: transient, editinline

Object within playercontroller that manages player input.

Internal variables[edit]

See PlayerController internal variables.

Default values[edit]

Property Value
bCanDoSpecial True
bIsPlayer True
CollisionComponent CylinderComponent'CollisionCylinder'
Components[1] CylinderComponent'CollisionCylinder'
NetPriority 3.0

Subobjects[edit]

CollisionCylinder[edit]

Class: Engine.CylinderComponent

Property Value
ReplacementPrimitive None

Sprite[edit]

Class: Engine.SpriteComponent

Inherits from: Controller.Sprite

Property Value
ReplacementPrimitive None

Enums[edit]

EInputMatchAction[edit]

How to match an input action

IMA_GreaterThan 
IMA_LessThan 

EInputTypes[edit]

Type of inputs the matching code recognizes

IT_XAxis 
IT_YAxis 

EProgressMessageType[edit]

Different types of progress messages

PMT_Clear 
Clears existing progress messages
PMT_Information 
No change in connection status - simply update the text being displayed
PMT_AdminMessage 
Message from the server admin
PMT_DownloadProgress 
Updates the amount remaining on a package download
PMT_ConnectionFailure 
Indicates that the connection to the server was lost
PMT_SocketFailure 
Indicates that an unrecoverable error was encountered by an open network socket. In cases where the socket in question was

the endpoint for the connection to the server, a PMT_ConnectionFailure event will generally be fired as well, probably during the next frame.

Structs[edit]

ClientAdjustment[edit]

Modifiers: native

float TimeStamp 
Actor.EPhysics newPhysics 
Object.Vector NewLoc 
Object.Vector NewVel 
Actor NewBase 
Object.Vector NewFloor 
byte bAckGoodMove 

DebugTextInfo[edit]

Modifiers: native

List of actors and debug text to draw,

See: AddDebugText(), RemoveDebugText(), and DrawDebugTextList()

Actor SrcActor 
Actor to draw DebugText over
Object.Vector SrcActorOffset 
Offset from SrcActor.Location to apply
Object.Vector SrcActorDesiredOffset 
Desired offset to interpolate to
string DebugText 
Text to display
float TimeRemaining 
Time remaining for the debug text, -1.f == infinite
float Duration 
Duration used to lerp desired offset
Object.Color TextColor 
Text color
bool bAbsoluteLocation 
whether the offset should be treated as absolute world location of the string

InputEntry[edit]

Modifiers: native

Individual entry to input matching sequences

EInputTypes Type 
Type of input to match
float Value 
Min value required to consider as a valid match
float TimeDelta 
Max amount of time since last match before sequence resets
EInputMatchAction Action 
What type of match is this?

InputMatchRequest[edit]

Modifiers: native

Contains information to match a series of a inputs and call the given function upon a match. Processed by PlayerInput, defined in the PlayerController.

array<InputEntry> Inputs 
Number of inputs to match, in sequence
Actor MatchActor 
Actor to call below functions on
name MatchFuncName 
Name of function to call upon successful match
delegate<InputMatchDelegate> MatchDelegate 
name FailedFuncName 
Name of function to call upon a failed partial match
name RequestName 
Name of this input request, mainly for debugging
int MatchIdx 
Current index into Inputs that is being matched
float LastMatchTime 
Last time an input entry in Inputs was matched

Delegates[edit]

CanUnpause[edit]

delegate bool CanUnpause ()

Callback the server uses to determine if the unpause can happen

InputMatchDelegate[edit]

delegate InputMatchDelegate ()


Functions[edit]

Static native functions[edit]

GetPlayerControllerFromNetId[edit]

native static function PlayerController GetPlayerControllerFromNetId (OnlineSubsystem.UniqueNetId PlayerNetId)

Returns the player controller associated with this net id

Parameters:

  • PlayerNetId - the id to search for

Returns:

the player controller if found, otherwise none

Other static functions[edit]

GetPartyGameTypeName[edit]

static function string GetPartyGameTypeName ()

Returns the party game info name for this game

GetPartyMapName[edit]

static function string GetPartyMapName ()

Returns the party map name for this game

Exec functions[edit]

See PlayerController exec functions.

Native functions[edit]

See PlayerController native functions.

Events[edit]

See PlayerController events.

Other instance functions[edit]

See PlayerController instance functions.

States[edit]

See PlayerController states.