PlayerData Struct Reference

#include <player.h>

Inheritance diagram for PlayerData:

Inheritance graph
[legend]
List of all members.

Public Types

typedef ShapeBaseData Parent
 RecoverDelayBits = 7
 JumpDelayBits = 7
 NumSpineNodes = 6
 ImpactBits = 3
 NUM_SPLASH_EMITTERS = 3
 BUBBLE_EMITTER = 2
 FootSoft
 FootHard
 FootMetal
 FootSnow
 FootShallowSplash
 FootWading
 FootUnderWater
 FootBubbles
 MoveBubbles
 WaterBreath
 ImpactSoft
 ImpactHard
 ImpactMetal
 ImpactSnow
 ImpactWaterEasy
 ImpactWaterMedium
 ImpactWaterHard
 ExitWater
 MaxSounds
 RootAnim
 RunForwardAnim
 BackBackwardAnim
 SideLeftAnim
 FallAnim
 JumpAnim
 StandJumpAnim
 LandAnim
 JetAnim
 NumMoveActionAnims = SideLeftAnim + 1
 NumTableActionAnims = JetAnim + 1
 NumExtraActionAnims = 512 - NumTableActionAnims
 NumActionAnims = NumTableActionAnims + NumExtraActionAnims
 ActionAnimBits = 9
 NullAnimation = (1 << ActionAnimBits) - 1
 ImpactNone
 ImpactNormal
 LightRecoil
 MediumRecoil
 HeavyRecoil
 NumRecoilSequences
enum  Constants {
  RecoverDelayBits = 7,
  JumpDelayBits = 7,
  NumSpineNodes = 6,
  ImpactBits = 3,
  NUM_SPLASH_EMITTERS = 3,
  BUBBLE_EMITTER = 2
}
 Various constants relating to the ShapeBaseData. More...
enum  Sounds {
  FootSoft,
  FootHard,
  FootMetal,
  FootSnow,
  FootShallowSplash,
  FootWading,
  FootUnderWater,
  FootBubbles,
  MoveBubbles,
  WaterBreath,
  ImpactSoft,
  ImpactHard,
  ImpactMetal,
  ImpactSnow,
  ImpactWaterEasy,
  ImpactWaterMedium,
  ImpactWaterHard,
  ExitWater,
  MaxSounds
}
 Zounds! More...
enum  {
  RootAnim,
  RunForwardAnim,
  BackBackwardAnim,
  SideLeftAnim,
  FallAnim,
  JumpAnim,
  StandJumpAnim,
  LandAnim,
  JetAnim,
  NumMoveActionAnims = SideLeftAnim + 1,
  NumTableActionAnims = JetAnim + 1,
  NumExtraActionAnims = 512 - NumTableActionAnims,
  NumActionAnims = NumTableActionAnims + NumExtraActionAnims,
  ActionAnimBits = 9,
  NullAnimation = (1 << ActionAnimBits) - 1
}
enum  Impacts {
  ImpactNone,
  ImpactNormal
}
enum  Recoil {
  LightRecoil,
  MediumRecoil,
  HeavyRecoil,
  NumRecoilSequences
}

Public Member Functions

 DECLARE_CONOBJECT (PlayerData)
 PlayerData ()
bool preload (bool server, String &errorStr)
 Called to prepare the datablock for use, after it has been unpacked.
void getGroundInfo (TSShapeInstance *, TSThread *, ActionAnimation *)
bool isTableSequence (S32 seq)
bool isJumpAction (U32 action)
virtual void packData (BitStream *stream)
virtual void unpackData (BitStream *stream)

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Public Attributes

bool renderFirstPerson
 Render the player shape in first person.
F32 pickupRadius
 Radius around player for items (on server).
F32 maxTimeScale
 Max timeScale for action animations.
F32 minLookAngle
 Lowest angle (radians) the player can look.
F32 maxLookAngle
 Highest angle (radians) the player can look.
F32 maxFreelookAngle
 Max left/right angle the player can look.
F32 minImpactSpeed
 Minimum impact speed required to apply fall damage.
F32 decalOffset
F32 groundImpactMinSpeed
 Minimum impact speed required to apply fall damage with the ground.
VectorF groundImpactShakeFreq
 Frequency in each direction for the camera to shake.
VectorF groundImpactShakeAmp
 How much to shake.
F32 groundImpactShakeDuration
 How long to shake.
F32 groundImpactShakeFalloff
 How fast the shake disapates.
SFXProfilesound [MaxSounds]
Point3F boxSize
 Width, depth, height.
ActionAnimation actionList [NumActionAnims]
U32 actionCount
U32 lookAction
S32 spineNode [NumSpineNodes]
S32 pickupDelta
 Base off of pcikupRadius.
F32 runSurfaceCos
 Angle from vertical in cos(runSurfaceAngle).
F32 jumpSurfaceCos
 Angle from vertical in cos(jumpSurfaceAngle).
S32 recoilSequence [NumRecoilSequences]
Physics constants
F32 runForce
 Force used to accelerate player.
F32 runEnergyDrain
 Energy drain/tick.
F32 minRunEnergy
 Minimum energy required to run.
F32 maxForwardSpeed
 Maximum forward speed when running.
F32 maxBackwardSpeed
 Maximum backward speed when running.
F32 maxSideSpeed
 Maximum side speed when running.
F32 maxUnderwaterForwardSpeed
 Maximum underwater forward speed when running.
F32 maxUnderwaterBackwardSpeed
 Maximum underwater backward speed when running.
F32 maxUnderwaterSideSpeed
 Maximum underwater side speed when running.
F32 maxStepHeight
 Maximum height the player can step up.
F32 runSurfaceAngle
 Maximum angle from vertical in degrees the player can run up.
F32 horizMaxSpeed
 Max speed attainable in the horizontal.
F32 horizResistSpeed
 Speed at which resistence will take place.
F32 horizResistFactor
 Factor of resistence once horizResistSpeed has been reached.
F32 upMaxSpeed
 Max vertical speed attainable.
F32 upResistSpeed
 Speed at which resistence will take place.
F32 upResistFactor
 Factor of resistence once upResistSpeed has been reached.
S32 recoverDelay
 # tick
F32 recoverRunForceScale
 RunForce multiplier in recover state.
F32 jumpForce
 Force exherted per jump.
F32 jumpEnergyDrain
 Energy drained per jump.
F32 minJumpEnergy
 Minimum energy required to jump.
F32 minJumpSpeed
 Minimum speed needed to jump.
F32 maxJumpSpeed
 Maximum speed before the player can no longer jump.
F32 jumpSurfaceAngle
 Angle from vertical in degrees where the player can jump.
S32 jumpDelay
 Delay time in ticks between jumps.
F32 jetJumpForce
F32 jetJumpEnergyDrain
 Energy per jump.
F32 jetMinJumpEnergy
F32 jetMinJumpSpeed
F32 jetMaxJumpSpeed
F32 jetJumpSurfaceAngle
 Angle vertical degrees.
Hitboxes
F32 boxHeadPercentage
F32 boxTorsoPercentage
S32 boxHeadLeftPercentage
S32 boxHeadRightPercentage
S32 boxHeadBackPercentage
S32 boxHeadFrontPercentage
Particles
All of the data relating to environmental effects

ParticleEmitterDatafootPuffEmitter
S32 footPuffID
S32 footPuffNumParts
F32 footPuffRadius
DecalDatadecalData
S32 decalID
ParticleEmitterDatadustEmitter
S32 dustID
SplashDatasplash
S32 splashId
F32 splashVelocity
F32 splashAngle
F32 splashFreqMod
F32 splashVelEpsilon
F32 bubbleEmitTime
F32 medSplashSoundVel
F32 hardSplashSoundVel
F32 exitSplashSoundVel
F32 footSplashHeight
F32 airControl
bool jumpTowardsNormal
ParticleEmitterDatasplashEmitterList [NUM_SPLASH_EMITTERS]
S32 splashEmitterIDList [NUM_SPLASH_EMITTERS]

Static Public Attributes

static ActionAnimationDef ActionAnimationList [NumTableActionAnims]

Classes

struct  ActionAnimation
struct  ActionAnimationDef
 Animation and other data intialized in onAdd. More...

Member Typedef Documentation

Reimplemented from ShapeBaseData.


Member Enumeration Documentation

Various constants relating to the ShapeBaseData.

Enumerator:
RecoverDelayBits 
JumpDelayBits 
NumSpineNodes 
ImpactBits 
NUM_SPLASH_EMITTERS 
BUBBLE_EMITTER 

Reimplemented from ShapeBaseData.

Zounds!

Enumerator:
FootSoft 
FootHard 
FootMetal 
FootSnow 
FootShallowSplash 
FootWading 
FootUnderWater 
FootBubbles 
MoveBubbles 
WaterBreath 
ImpactSoft 
ImpactHard 
ImpactMetal 
ImpactSnow 
ImpactWaterEasy 
ImpactWaterMedium 
ImpactWaterHard 
ExitWater 
MaxSounds 

anonymous enum

Enumerator:
RootAnim 
RunForwardAnim 
BackBackwardAnim 
SideLeftAnim 
FallAnim 
JumpAnim 
StandJumpAnim 
LandAnim 
JetAnim 
NumMoveActionAnims 
NumTableActionAnims 
NumExtraActionAnims 
NumActionAnims 
ActionAnimBits 
NullAnimation 

Enumerator:
ImpactNone 
ImpactNormal 

Enumerator:
LightRecoil 
MediumRecoil 
HeavyRecoil 
NumRecoilSequences 


Constructor & Destructor Documentation

PlayerData::PlayerData (  ) 


Member Function Documentation

PlayerData::DECLARE_CONOBJECT ( PlayerData   ) 

bool PlayerData::preload ( bool  server,
String errorStr 
) [virtual]

Called to prepare the datablock for use, after it has been unpacked.

Parameters:
server Set if we're running on the server (and therefore don't need to load things like textures or sounds).
errorStr If an error occurs in loading, this is set to a short string describing the error.
Returns:
True if all went well; false if something failed.
See also:
preload() and File Downloading

Reimplemented from ShapeBaseData.

void PlayerData::getGroundInfo ( TSShapeInstance ,
TSThread ,
ActionAnimation  
)

bool PlayerData::isTableSequence ( S32  seq  ) 

bool PlayerData::isJumpAction ( U32  action  ) 

static void PlayerData::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDeprecatedField(), addGroup(), endGroup()

Reimplemented from ShapeBaseData.

virtual void PlayerData::packData ( BitStream stream  )  [virtual]

Reimplemented from ShapeBaseData.

virtual void PlayerData::unpackData ( BitStream stream  )  [virtual]

Reimplemented from ShapeBaseData.


Member Data Documentation

Render the player shape in first person.

Radius around player for items (on server).

Max timeScale for action animations.

Lowest angle (radians) the player can look.

Highest angle (radians) the player can look.

Max left/right angle the player can look.

Force used to accelerate player.

Energy drain/tick.

Minimum energy required to run.

Maximum forward speed when running.

Maximum backward speed when running.

Maximum side speed when running.

Maximum underwater forward speed when running.

Maximum underwater backward speed when running.

Maximum underwater side speed when running.

Maximum height the player can step up.

Maximum angle from vertical in degrees the player can run up.

Max speed attainable in the horizontal.

Speed at which resistence will take place.

Factor of resistence once horizResistSpeed has been reached.

Max vertical speed attainable.

Speed at which resistence will take place.

Factor of resistence once upResistSpeed has been reached.

RunForce multiplier in recover state.

Force exherted per jump.

Energy drained per jump.

Minimum energy required to jump.

Minimum speed needed to jump.

Maximum speed before the player can no longer jump.

Angle from vertical in degrees where the player can jump.

Delay time in ticks between jumps.

Angle vertical degrees.

Minimum impact speed required to apply fall damage.

Minimum impact speed required to apply fall damage with the ground.

Frequency in each direction for the camera to shake.

How fast the shake disapates.

Width, depth, height.

ActionAnimationDef PlayerData::ActionAnimationList[NumTableActionAnims] [static]

S32 PlayerData::spineNode[NumSpineNodes]

Base off of pcikupRadius.

Angle from vertical in cos(runSurfaceAngle).

Angle from vertical in cos(jumpSurfaceAngle).

S32 PlayerData::recoilSequence[NumRecoilSequences]

S32 PlayerData::splashEmitterIDList[NUM_SPLASH_EMITTERS]