|
Animation threads & data |
Player::ActionAnimation | mActionAnimation |
Player::ArmAnimation | mArmAnimation |
TSThread * | mArmThread |
TSThread * | mHeadVThread |
TSThread * | mHeadHThread |
TSThread * | mRecoilThread |
static Range | mArmRange |
static Range | mHeadVRange |
static Range | mHeadHRange |
Public Member Functions |
| DECLARE_CONOBJECT (Player) |
| Player () |
| ~Player () |
Point3F | getVelocity () const |
| Gets the velocity of the object.
|
void | setVelocity (const VectorF &vel) |
| Sets the velocity of this object.
|
void | applyImpulse (const Point3F &pos, const VectorF &vec) |
| Apply an impulse at the given point, with magnitude/direction of vec.
|
const Point3F & | getRotation () |
| Get the rotation of the player.
|
const Point3F & | getHeadRotation () |
| Get the rotation of the head of the player.
|
void | getDamageLocation (const Point3F &in_rPos, const char *&out_rpVert, const char *&out_rpQuad) |
bool | canJump () |
| Can the player jump?
|
bool | canJetJump () |
| Can the player jet?
|
bool | haveContact () |
| Is it in contact with something.
|
void | getMuzzlePointAI (U32 imageSlot, Point3F *point) |
float | getMaxForwardVelocity () |
| duh
|
virtual bool | isDisplacable () const |
| Returns true if this object allows itself to be displaced.
|
virtual Point3F | getMomentum () const |
| Returns the momentum of this object.
|
virtual void | setMomentum (const Point3F &momentum) |
| Sets the momentum of this object.
|
virtual F32 | getMass () const |
| Returns the mass of this object.
|
virtual bool | displaceObject (const Point3F &displaceVector) |
| Displaces this object by a vector.
|
virtual bool | getAIMove (Move *) |
bool | checkDismountPosition (const MatrixF &oldPos, const MatrixF &newPos) |
| Is it safe to dismount here?
|
bool | onAdd () |
| Called when the object is added to the sim.
|
void | onRemove () |
| Called when the object is removed from the sim.
|
bool | onNewDataBlock (GameBaseData *dptr) |
| Called when a new datablock is set.
|
void | onScaleChanged () |
| Called when the size of the object changes.
|
const char * | getStateName () |
bool | setActionThread (const char *sequence, bool hold, bool wait, bool fsp=false) |
bool | setArmThread (const char *sequence) |
void | setControlObject (ShapeBase *obj) |
| sets the object this is controling
|
ShapeBase * | getControlObject () |
| Returns the object this is controling.
|
void | updateWorkingCollisionSet () |
void | processTick (const Move *move) |
| Processes a move event and updates object state once every 32 milliseconds.
|
void | interpolateTick (F32 delta) |
| Interpolates between tick events.
|
void | advanceTime (F32 dt) |
| Advances simulation time for animations.
|
bool | castRay (const Point3F &start, const Point3F &end, RayInfo *info) |
| Casts a ray from start to end, stores gathered information in 'info' returns true if successful.
|
bool | buildPolyList (AbstractPolyList *polyList, const Box3F &box, const SphereF &sphere) |
| Builds a polylist of the polygons in this object returns true if successful.
|
void | buildConvex (const Box3F &box, Convex *convex) |
| Builds a convex hull for this object.
|
bool | isControlObject () |
void | onCameraScopeQuery (NetConnection *cr, CameraScopeQuery *) |
| Control object scoping.
|
void | writePacketData (GameConnection *conn, BitStream *stream) |
| Write state information necessary to perform client side prediction of an object.
|
void | readPacketData (GameConnection *conn, BitStream *stream) |
| Read data written with writePacketData() and update the object state.
|
U32 | packUpdate (NetConnection *conn, U32 mask, BitStream *stream) |
| Instructs this object to pack its state for transfer over the network.
|
void | unpackUpdate (NetConnection *conn, BitStream *stream) |
| Instructs this object to read state data previously packed with packUpdate.
|
virtual bool | prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState) |
| Called when the SceneGraph is ready for the registration of RenderImages.
|
|
Transforms are all in object space
|
void | setTransform (const MatrixF &mat) |
| Sets the Object -> World transform.
|
void | getEyeTransform (MatrixF *mat) |
| Returns the eye transform of this shape, IE the eyes of a player.
|
void | getRenderEyeTransform (MatrixF *mat) |
void | getCameraParameters (F32 *min, F32 *max, Point3F *offset, MatrixF *rot) |
| Gets the minimum viewing distance, maximum viewing distance, camera offsetand rotation for this object, if the world were to be viewed through its eyes.
|
void | getMuzzleTransform (U32 imageSlot, MatrixF *mat) |
| Muzzle transform of mounted object in world space.
|
void | getRenderMuzzleTransform (U32 imageSlot, MatrixF *mat) |
Static Public Member Functions |
static void | consoleInit () |
| Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.
|
Public Attributes |
OrthoBoxConvex | mConvex |
Box3F | mWorkingQueryBox |
Box3F | mScaledBox |
Protected Member Functions |
void | setState (ActionState state, U32 ticks=0) |
void | updateState () |
void | updateMove (const Move *move) |
| Update the movement.
|
bool | updatePos (const F32 travelTime=TickSec) |
| Interpolate movement.
|
void | updateLookAnimation (F32 dT=0.f) |
| Update head animation.
|
void | updateAnimation (F32 dt) |
| Update other animations.
|
void | updateAnimationTree (bool firstPerson) |
bool | step (Point3F *pos, F32 *maxStep, F32 time) |
void | checkMissionArea () |
| See if the player is still in the mission area.
|
virtual bool | setArmThread (U32 action) |
virtual void | setActionThread (U32 action, bool forward, bool hold=false, bool wait=false, bool fsp=false, bool forceSet=false) |
virtual void | updateActionThread () |
virtual void | pickActionAnimation () |
void | onUnmount (ShapeBase *obj, S32 node) |
void | setPosition (const Point3F &pos, const Point3F &viewRot) |
void | setRenderPosition (const Point3F &pos, const Point3F &viewRot, F32 dt=-1) |
void | findContact (bool *run, bool *jump, VectorF *contactNormal) |
virtual void | onImageRecoil (U32 imageSlot, ShapeBaseImageData::StateData::RecoilState) |
virtual void | updateDamageLevel () |
virtual void | updateDamageState () |
void | setControllingClient (GameConnection *client) |
| Set which client is controlling this player.
|
void | calcClassRenderData () |
| Preprender logic.
|
void | playFootstepSound (bool triggeredLeft, S32 sound) |
| Play a footstep sound.
|
void | playImpactSound () |
| Play an impact sound.
|
bool | inDeathAnim () |
| Are we in the process of dying?
|
F32 | deathDelta (Point3F &delta) |
void | updateDeathOffsets () |
bool | inSittingAnim () |
|
void | updateSplash () |
| Update the splash effect.
|
void | updateFroth (F32 dt) |
| Update any froth.
|
void | updateWaterSounds (F32 dt) |
| Update water sounds.
|
bool | pointInWater (Point3F &point) |
| Tests to see if a point is in water.
|
void | createSplash (Point3F &pos, F32 speed) |
| Creates a splash.
|
bool | collidingWithWater (Point3F &waterHeight) |
| Are we collising with water?
|
Protected Attributes |
bool | mJetting |
Private Types |
typedef ShapeBase | Parent |
| ActionMask = Parent::NextFreeMask << 0 |
| MoveMask = Parent::NextFreeMask << 1 |
| ImpactMask = Parent::NextFreeMask << 2 |
| NextFreeMask = Parent::NextFreeMask << 3 |
| NullState |
| MoveState |
| RecoverState |
| NumStateBits = 3 |
enum | MaskBits {
ActionMask = Parent::NextFreeMask << 0,
MoveMask = Parent::NextFreeMask << 1,
ImpactMask = Parent::NextFreeMask << 2,
NextFreeMask = Parent::NextFreeMask << 3
} |
| Bit masks for different types of events. More...
|
enum | ActionState {
NullState,
MoveState,
RecoverState,
NumStateBits = 3
} |
| Main player state. More...
|
Private Attributes |
SimObjectPtr< ParticleEmitter > | mSplashEmitter [PlayerData::NUM_SPLASH_EMITTERS] |
F32 | mBubbleEmitterTime |
StateDelta | delta |
| Used for interpolation on the client.
|
S32 | mPredictionCount |
| Number of ticks to predict.
|
Point3F | mHead |
| Head rotation, uses only x & z.
|
Point3F | mRot |
| Body rotation, uses only z.
|
VectorF | mVelocity |
| Velocity.
|
Point3F | mAnchorPoint |
| Pos compression anchor.
|
S32 | mImpactSound |
S32 | mMountPending |
| mMountPending suppresses tickDelay countdown so players will sit until their mount, or another animation, comes through (or 13 seconds elapses).
|
ActionState | mState |
| What is the player doing?
|
bool | mFalling |
| Falling in mid-air?
|
S32 | mJumpDelay |
| Delay till next jump.
|
S32 | mContactTimer |
| Ticks since last contact.
|
Point3F | mJumpSurfaceNormal |
| Normal of the surface the player last jumped on.
|
U32 | mJumpSurfaceLastContact |
| How long it's been since the player landed (ticks).
|
F32 | mWeaponBackFraction |
| Amount to slide the weapon back (if it's up against something).
|
SFXSource * | mMoveBubbleSound |
| Sound for moving bubbles.
|
SFXSource * | mWaterBreathSound |
| Sound for underwater breath.
|
SimObjectPtr< ShapeBase > | mControlObject |
| Controlling object.
|
bool | mInMissionArea |
| Are we in the mission area?
|
S32 | mRecoverTicks |
| same as recoverTicks in the player datablock
|
U32 | mReversePending |
bool | inLiquid |
| Are we in liquid?
|
PlayerData * | mDataBlock |
| MMmmmmm...datablock...
|
Point3F | mLastPos |
| Holds the last position for physics updates.
|
Point3F | mLastWaterPos |
| Same as mLastPos, but for water.
|
Player::ContactInfo | mContactInfo |
Player::Death | mDeath |
Static Private Attributes |
static F32 | mGravity |
| Gravity.
|
Classes |
struct | ActionAnimation |
struct | ArmAnimation |
struct | ContactInfo |
struct | Death |
struct | Range |
struct | StateDelta |
| Client interpolation/warp data. More...
|