|
Function Summary |
void |
ActivateInventoryItem(class InvItem)
// Activate specific inventory item
|
void |
ActivateItem()
// The player wants to active selected item
|
rotator |
AdjustAim(Ammunition FiredAmmunition, vector projStart, int aimerror)
/* AdjustAim()
Calls this version for player aiming help.
Aimerror not used in this version.
Only adjusts aiming at pawns
*/ |
rotator |
AdjustAimForDisplay(Ammunition FiredAmmunition, vector projStart)
// if not leading, add slight random error ( significant at long distances )
if ( !bNoZAdjust )
{
AimRot = rotator(AimSpot - projStart);
if ( FOVAngle < DefaultFOV - 8 )
AimRot.Yaw = AimRot.Yaw + 200 - Rand(400);
else
AimRot.Yaw = AimRot.Yaw + 375 - Rand(750);
return AimRot;
}
}
else if ( !FastTrace(projStart + 0.9 * bestDist * Normal(FireDir), projStart) )
{
FireDir = BestTarget.Location - projStart;
AimSpot = projStart + bestDist * Normal(FireDir);
}
return rotator(AimSpot - projStart);
}
*/ |
void |
AdjustRadius(float MaxMove) |
void |
AdjustView(float DeltaTime)
// Player view.
// Compute the rendering viewpoint for the player.
//
|
void |
AltFire(optional float)
// The player wants to alternate-fire.
|
void |
AskForPawn() |
eAttitude |
AttitudeTo(Pawn Other) |
void |
AttribPadToViewport() |
void |
BehindView(Bool B) |
void |
CalcBehindView(out vector, out rotator, float Dist) |
void |
CalcFirstPersonView(out vector, out rotator)
// First-person view.
CameraRotation = Rotation;
CameraLocation = CameraLocation + Pawn.EyePosition() + WalkBob + ShakeOffset;
}*/ |
void |
CalcFirstPersonView(out vector, out rotator)
// First-person view.
CameraRotation = Rotation;
CameraLocation = CameraLocation + Pawn.EyePosition() + WalkBob + ShakeOffset;
}*/ |
void |
ChangeName(string S) |
void |
ChangeSetHand(string S) |
void |
ChangeTeam(int N) |
void |
ChangedWeapon()
// Just changed to pendingWeapon
|
void |
CheckBob(float DeltaTime, float Speed2D, vector Y)
{
if ( Speed2D < 10 )
BobTime += 0.2 * DeltaTime;
else
BobTime += DeltaTime * (0.3 + 0.7 * Speed2D/Pawn.GroundSpeed);
WalkBob = Y * 0.4 * Bob * Speed2D * sin(8 * BobTime);
AppliedBob = AppliedBob * (1 - FMin(1, 16 * deltatime));
if ( Speed2D < 10 )
WalkBob.Z = AppliedBob;
else
WalkBob.Z = AppliedBob + 0.3 * Bob * Speed2D * sin(16 * BobTime);
if ( LandBob > 0.01 )
{
AppliedBob += FMin(1, 16 * deltatime) * LandBob;
LandBob *= (1 - 8*Deltatime);
}
}*/ |
void |
CheckBob(float DeltaTime, float Speed2D, vector Y)
{
if ( Speed2D < 10 )
BobTime += 0.2 * DeltaTime;
else
BobTime += DeltaTime * (0.3 + 0.7 * Speed2D/Pawn.GroundSpeed);
WalkBob = Y * 0.4 * Bob * Speed2D * sin(8 * BobTime);
AppliedBob = AppliedBob * (1 - FMin(1, 16 * deltatime));
if ( Speed2D < 10 )
WalkBob.Z = AppliedBob;
else
WalkBob.Z = AppliedBob + 0.3 * Bob * Speed2D * sin(16 * BobTime);
if ( LandBob > 0.01 )
{
AppliedBob += FMin(1, 16 * deltatime) * LandBob;
LandBob *= (1 - 8*Deltatime);
}
}*/ |
void |
CheckShake(out float, out float, out float, out float)
/* |
void |
ClearProgressMessages() |
void |
ClientAdjustGlow(float scale, vector fog) |
void |
ClientAdjustPosition(float TimeStamp, name newState, EPhysics newPhysics, float NewLocX, float NewLocY, float NewLocZ, float NewVelX, float NewVelY, float NewVelZ, Actor NewBase)
/* ClientAdjustPosition
- pass newloc and newvel in components so they don't get rounded
*/ |
void |
ClientFilter(Color FC, color FCW, float FCS) |
void |
ClientFlash(float scale, vector fog) |
void |
ClientGotoState(name NewState, name NewLabel)
/* ClientGotoState()
server uses this to force client into NewState
*/ |
void |
ClientHighLight(color TargetColor, float TargetHighLight, optional Material) |
void |
ClientInstantFlash(float scale, vector fog) |
simulated |
ClientPlaySound(sound ASound, optional bool)
//Play a sound client side (so only client will hear it
|
simulated |
ClientReliablePlaySound(sound ASound, optional bool) |
void |
ClientReplicateSkins(Material Skin1, optional Material, optional Material, optional Material) |
void |
ClientRestart() |
void |
ClientSetBehindView(bool B) |
void |
ClientSetFixedCamera(bool B) |
void |
ClientShake(vector ShakeRoll, vector OffsetMag, vector ShakeRate, float OffsetTime)
/* ClientShake()
Function called on client to shake view.
Only ShakeView() should call ClientShake()
*/ |
event |
ClientTravel(string URL, ETravelType TravelType, bool bItems) |
void |
ClientUpdatePosition() |
void |
ClientVoiceMessage(PlayerReplicationInfo Sender, PlayerReplicationInfo Recipient, name messagetype, byte messageID)
{
Local Vector WBob;
WBob = BobDamping * WalkBob;
WBob.Z = (0.45 + 0.55 * BobDamping) * WalkBob.Z;
return (WBob + 0.9 * ShakeOffset);
}*/ |
int |
CompressAccel(int C) |
string |
ConsoleCommand(string Command) |
void |
CopyToClipboard(string Text)
// Execute a console command in the context of this player, then forward to Actor.ConsoleCommand.
|
void |
EndZoom() |
void |
EnterStartState() |
void |
FOV(float F) |
int |
FindStairRotation(float DeltaTime)
/* FindStairRotation()
returns an integer to use as a pitch to orient player view along current ground (flat, up, or down)
*/ |
void |
Fire(optional float)
// The player wants to fire.
|
void |
FixFOV() |
void |
ForceDeathUpdate()
/* ForceDeathUpdate()
Make sure ClientAdjustPosition immediately informs client of pawn's death
*/ |
void |
ForceReload() |
string |
GetDefaultURL(string Option) |
LevelInfo |
GetEntryLevel() |
int |
GetFacingDirection()
/* GetFacingDirection()
returns direction faced relative to movement dir
0 = forward
16384 = right
32768 = back
49152 = left
*/ |
SavedMove |
GetFreeMove() |
int |
GetPadNumber()
// Pad management
|
string |
GetPlayerNetworkAddress() |
void |
GivePawn(Pawn NewPawn) |
void |
HandlePickup(Pickup pick) |
void |
HandleWalking()
{
if ( Pawn != None )
Pawn.SetWalking(((bRun != 0) || (bDuck != 0)) && !Region.Zone.IsA('WarpZoneInfo'));
}*/ |
void |
HandleWalking()
{
if ( Pawn != None )
Pawn.SetWalking(((bRun != 0) || (bDuck != 0)) && !Region.Zone.IsA('WarpZoneInfo'));
}*/ |
void |
Jump(optional float)
//*************************************************************************************
// Normal gameplay execs
// Type the name of the exec function at the console to execute it
|
void |
LocalTravel(string URL) |
void |
LongClientAdjustPosition(float TimeStamp, name newState, EPhysics newPhysics, float NewLocX, float NewLocY, float NewLocZ, float NewVelX, float NewVelY, float NewVelZ, Actor NewBase, float NewFloorX, float NewFloorY, float NewFloorZ)
/* LongClientAdjustPosition
long version, when care about pawn's floor normal
*/ |
void |
MoveAutonomous(float DeltaTime, bool NewbRun, bool NewbDuck, bool NewbPressedJump, eDoubleClickDir DoubleClickMove, vector newAccel, rotator DeltaRot) |
void |
Name(string S) |
void |
NextWeapon()
/* NextWeapon()
- switch to next inventory group weapon
*/ |
bool |
NotifyLanded(vector HitNormal) |
void |
OptimizeInputBindings()
// "Compile" the commands associated with each input key
|
string |
PasteFromClipboard() |
void |
Pause()
/* Pause()
Command to try to pause the game.
*/ |
void |
PawnDied()
// unpossessed a pawn (because pawn was killed)
|
simulated |
PlayBeepSound() |
void |
PlayerMove(float DeltaTime) |
void |
Possess(Pawn aPawn)
// Possess a pawn
|
void |
PrevItem()
// The player wants to select previous item
|
void |
PrevWeapon()
/* PrevWeapon()
- switch to previous inventory group weapon
*/ |
void |
ProcessMove(float DeltaTime, vector newAccel, eDoubleClickDir DoubleClickMove, rotator DeltaRot) |
void |
QuickLoad()
/* QuickLoad()
Load game from slot 9
*/ |
void |
QuickSave()
/* QuickSave()
Save game to slot 9
*/ |
void |
ReplicateMove(float DeltaTime, vector NewAccel, eDoubleClickDir DoubleClickMove, rotator DeltaRot)
//
// Replicate this client's desired movement to the server.
//
|
void |
Reset()
/* Reset()
reset actor to initial state - used when restarting level without reloading.
*/ |
void |
ResetFOV() |
void |
ResetKeyboard() |
void |
Restart() |
void |
RestartLevel() |
void |
Say(string Msg)
// Send a message to all players.
|
void |
ServerMove()
/*
========================================================================
Here's how player movement prediction, replication and correction works in network games:
Every tick, the PlayerTick() function is called. It calls the PlayerMove() function (which is implemented
in various states). PlayerMove() figures out the acceleration and rotation, and then calls ProcessMove()
(for single player or listen servers), or ReplicateMove() (if its a network client).
ReplicateMove() saves the move (in the PendingMove list), calls ProcessMove(), and then replicates the move
to the server by calling the replicated |
void |
ServerMove()
/*
========================================================================
Here's how player movement prediction, replication and correction works in network games:
Every tick, the PlayerTick() function is called. It calls the PlayerMove() function (which is implemented
in various states). PlayerMove() figures out the acceleration and rotation, and then calls ProcessMove()
(for single player or listen servers), or ReplicateMove() (if its a network client).
ReplicateMove() saves the move (in the PendingMove list), calls ProcessMove(), and then replicates the move
to the server by calling the replicated |
void |
ServerRestartGame() |
void |
ServerSetHandedness(float hand)
// ------------------------------------------------------------------------
|
void |
SetFOV(float NewFOV) |
void |
SetFOVAngle(float newFOV) |
void |
SetHand() |
bool |
SetPause(BOOL bPause)
/* SetPause()
Try to pause game; returns success indicator.
Replicated to server in network games.
*/ |
void |
SetViewTarget(Actor NewViewTarget) |
void |
ShakeView(float shaketime, float RollMag, vector OffsetMag, float RollRate, vector OffsetRate, float OffsetTime)
/* ShakeView()
Call this function to shake the player's view
shaketime = how long to roll view
RollMag = how far to roll view as it shakes
OffsetMag = max view offset
RollRate = how fast to roll view
OffsetRate = how fast to offset view
OffsetTime = how long to offset view (number of shakes)
*/ |
void |
ShortClientAdjustPosition(float TimeStamp, name newState, EPhysics newPhysics, float NewLocX, float NewLocY, float NewLocZ, Actor NewBase)
/* ShortClientAdjustPosition
bandwidth saving version, when velocity is zeroed
*/ |
void |
ShortServerMove(float TimeStamp, vector ClientLoc, bool NewbRun, bool NewbDuck, bool NewbJumpStatus, byte ClientRoll, int View)
/* ShortServerMove()
compressed version of server move for bandwidth saving
*/ |
void |
SpawnDefaultHUD()
/* SpawnDefaultHUD()
Spawn a HUD (make sure that PlayerController always has valid HUD, even if \
ClientSetHUD() hasn't been called\
*/ |
void |
Speech(int Type, int Index, int Callsign)
// Send a voice message of a certain type to a certain player.
|
void |
StartZoom() |
void |
StopZoom() |
void |
Suicide() |
void |
SwitchLevel(string URL) |
void |
SwitchTeam() |
void |
SwitchWeapon(byte F)
// The player wants to switch to weapon group number F.
|
void |
TeamSay(string Msg) |
void |
ThrowWeapon()
/* ThrowWeapon()
Throw out current weapon, and switch to a new weapon
*/ |
void |
ToggleZoom()
// ------------------------------------------------------------------------
// Zooming/FOV change functions
|
void |
TurnAround() |
bool |
TurnTowardNearestEnemy() |
void |
Typing(bool bTyping) |
void |
UnPossess()
// unpossessed a pawn (not because pawn was killed)
|
void |
UpdateBob(float F) |
void |
UpdateRotation(float DeltaTime, float maxPitch) |
void |
UpdateURL(string NewOption, string NewValue, bool bSaveDefault) |
void |
Use()
// The player wants to use something in the level.
|
void |
VeryShortClientAdjustPosition(float TimeStamp, float NewLocX, float NewLocY, float NewLocZ, Actor NewBase)
/* VeryShortClientAdjustPosition
bandwidth saving version, when velocity is zeroed, and pawn is walking
*/ |
void |
ViewFlash(float DeltaTime)
{
local vector goalFog;
local float goalscale, delta;
delta = FMin(0.1, DeltaTime);
goalScale = 1 + DesiredFlashScale + ConstantGlowScale;
goalFog = DesiredFlashFog + ConstantGlowFog;
if ( Pawn != None )
{
goalScale += Pawn.HeadVolume.ViewFlash.X;
goalFog += Pawn.HeadVolume.ViewFog;
}
DesiredFlashScale -= DesiredFlashScale * 2 * delta;
DesiredFlashFog -= DesiredFlashFog * 2 * delta;
FlashScale.X += (goalScale - FlashScale.X + InstantFlash) * 10 * delta;
FlashFog += (goalFog - FlashFog + InstantFog) * 10 * delta;
InstantFlash = 0;
InstantFog = vect(0,0,0);
if ( FlashScale.X > 0.981 )
FlashScale.X = 1;
FlashScale = FlashScale.X * vect(1,1,1);
if ( FlashFog.X < 0.019 )
FlashFog.X = 0;
if ( FlashFog.Y < 0.019 )
FlashFog.Y = 0;
if ( FlashFog.Z < 0.019 )
FlashFog.Z = 0;
}*/ |
void |
ViewFlash(float DeltaTime)
{
local vector goalFog;
local float goalscale, delta;
delta = FMin(0.1, DeltaTime);
goalScale = 1 + DesiredFlashScale + ConstantGlowScale;
goalFog = DesiredFlashFog + ConstantGlowFog;
if ( Pawn != None )
{
goalScale += Pawn.HeadVolume.ViewFlash.X;
goalFog += Pawn.HeadVolume.ViewFog;
}
DesiredFlashScale -= DesiredFlashScale * 2 * delta;
DesiredFlashFog -= DesiredFlashFog * 2 * delta;
FlashScale.X += (goalScale - FlashScale.X + InstantFlash) * 10 * delta;
FlashFog += (goalFog - FlashFog + InstantFog) * 10 * delta;
InstantFlash = 0;
InstantFog = vect(0,0,0);
if ( FlashScale.X > 0.981 )
FlashScale.X = 1;
FlashScale = FlashScale.X * vect(1,1,1);
if ( FlashFog.X < 0.019 )
FlashFog.X = 0;
if ( FlashFog.Y < 0.019 )
FlashFog.Y = 0;
if ( FlashFog.Z < 0.019 )
FlashFog.Z = 0;
}*/ |
void |
ViewShake(float DeltaTime)
// modify shake offset
ShakeOffset.X += DeltaTime * ShakeOffsetRate.X;
CheckShake(MaxShakeOffset.X, ShakeOffset.X, ShakeOffsetRate.X, ShakeOffsetTime.X);
ShakeOffset.Y += DeltaTime * ShakeOffsetRate.Y;
CheckShake(MaxShakeOffset.Y, ShakeOffset.Y, ShakeOffsetRate.Y, ShakeOffsetTime.Y);
ShakeOffset.Z += DeltaTime * ShakeOffsetRate.Z;
CheckShake(MaxShakeOffset.Z, ShakeOffset.Z, ShakeOffsetRate.Z, ShakeOffsetTime.Z);
}
ViewRotation = Rotation;
if ( ShakeRollRate != 0 )
{
ViewRotation.Roll = ((ViewRotation.Roll & 65535) + ShakeRollRate * DeltaTime) & 65535;
if ( ViewRotation.Roll > 32768 )
ViewRotation.Roll -= 65536;
FRoll = ViewRotation.Roll;
CheckShake(MaxShakeRoll, FRoll, ShakeRollRate, ShakeRollTime);
ViewRotation.Roll = FRoll;
}
else if ( bZeroRoll )
ViewRotation.Roll = 0;
SetRotation(ViewRotation);
}*/ |
void |
ViewShake(float DeltaTime)
// modify shake offset
ShakeOffset.X += DeltaTime * ShakeOffsetRate.X;
CheckShake(MaxShakeOffset.X, ShakeOffset.X, ShakeOffsetRate.X, ShakeOffsetTime.X);
ShakeOffset.Y += DeltaTime * ShakeOffsetRate.Y;
CheckShake(MaxShakeOffset.Y, ShakeOffset.Y, ShakeOffsetRate.Y, ShakeOffsetTime.Y);
ShakeOffset.Z += DeltaTime * ShakeOffsetRate.Z;
CheckShake(MaxShakeOffset.Z, ShakeOffset.Z, ShakeOffsetRate.Z, ShakeOffsetTime.Z);
}
ViewRotation = Rotation;
if ( ShakeRollRate != 0 )
{
ViewRotation.Roll = ((ViewRotation.Roll & 65535) + ShakeRollRate * DeltaTime) & 65535;
if ( ViewRotation.Roll > 32768 )
ViewRotation.Roll -= 65536;
FRoll = ViewRotation.Roll;
CheckShake(MaxShakeRoll, FRoll, ShakeRollRate, ShakeRollTime);
ViewRotation.Roll = FRoll;
}
else if ( bZeroRoll )
ViewRotation.Roll = 0;
SetRotation(ViewRotation);
}*/ |
vector |
WeaponBob(float BobDamping)
/* --> Become a 100% C++ virtual function
|
void |
damageAttitudeTo(Pawn Other, float Damage) |