Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

psMovementManager Class Reference

Manages main character movements. More...

#include <psmovement.h>

List of all members.

Public Member Functions

void CancelRunTo ()
GEMClientActorControlledActor ()
const psCharModeFindCharMode (size_t id) const
const psCharModeFindCharMode (const char *name) const
const psMovementFindMovement (const char *name) const
bool GetInvertedMouse ()
const char * GetModeIdleAnim (size_t id) const
bool HandleEvent (iEvent &event)
void HandleMessage (MsgEntry *me)
bool IsLocked ()
bool IsReady ()
 Ready to receive events?
void LoadMouseSettings ()
void LockMoves (bool v)
void MouseLook (bool v)
bool MouseLook ()
void MouseLook (iEvent &ev)
void MouseLookCanAct (bool v)
bool MouseLookCanAct ()
bool MouseMove ()
void MouseZoom (bool v)
bool MouseZoom ()
void MouseZoom (iEvent &ev)
bool MoveStateChanged (psMoveState &state)
 psMovementManager (iEventNameRegistry *eventname_reg, psControlManager *controls)
void Push (const psMovement *move)
 Use a movement once.
void SaveMoveState (psMoveState &state)
void SetActor (GEMClientActor *actor)
void SetInvertedMouse (bool v)
void SetMouseMove (bool v)
void SetMouseSensX (float v)
void SetMouseSensY (float v)
bool SetRun (bool runState)
 Set the character run mode.
void SetRunToPos (psPoint &mouse)
void SetSneaking (bool v)
bool Sneaking ()
void Start (const psCharMode *mode)
 Switch to a new mode.
void Start (const psMovement *move)
 Add a new movement.
void Stop (const psMovement *move)
 Stop an existing movement.
void Stop (const psCharMode *mode)
 Switch back to normal mode.
void StopAllMovement ()
 Stops all movements, resets mode, cancels mousemove, and halts the actor.
void StopControlledMovement ()
 Stops all user applied movements/modes (does not halt actor if falling or mousemove)
void ToggleAutoMove ()
bool ToggleRun ()
 Toggle the character run mode.
void UpdateMouseLook ()
void UpdateRunTo ()
 ~psMovementManager ()

Protected Member Functions

void ApplyMod (psVelocity &vel)
void HandleMod (psMoveModMsg &msg)
void SetActorMode (const psCharMode *mode)
void SetupControls ()
void SetupMovements (psMovementInfoMessage &msg)
void UpdateVelocity ()

Protected Attributes

psVelocity activeMod
psMoveModMsg::ModType activeModType
uint activeMoves
 Bit mask for active moves.
GEMClientActoractor
 Actor we're moving here.
const psCharModeactormode
 Current active mode.
bool autoMove
const psMovementbackward
psControlManagercontrols
const psCharModedefaultmode
 Default actor mode.
csEventID event_frame
csEventID event_mousemove
const psMovementforward
bool invertedMouse
uint kbdRotate
float lastDeltaX
float lastDeltaY
float lastDist
bool locked
 Is this player allowed to move?
csPDelArray< psCharModemodes
 All available character modes.
int mouseAutoMove
bool mouseLook
bool mouseLookCanAct
bool mouseMove
bool mouseZoom
psVelocity move_total
 Current total of all active move velocities.
csPDelArray< psMovementmoves
 All available movement types.
bool onGround
 Is actor on ground or airborne?
bool ready
 Have movements been setup?
const psCharModerun
csVector3 runToDiff
int runToMarkerID
float sensX
float sensY
bool sneaking
bool toggleRun
const psCharModewalk

Detailed Description

Manages main character movements.

Starts/stops modes and movements for the controled character. Modes and movements are stored in the server's database and requested upon login. The primary way this class is accessed is via psTriggerHandler function calls from button presses registered by psControlManager.

Definition at line 84 of file psmovement.h.


Constructor & Destructor Documentation

psMovementManager::psMovementManager ( iEventNameRegistry *  eventname_reg,
psControlManager controls 
)
psMovementManager::~psMovementManager ( )

Member Function Documentation

void psMovementManager::ApplyMod ( psVelocity vel) [protected]
void psMovementManager::CancelRunTo ( )
GEMClientActor* psMovementManager::ControlledActor ( ) [inline]

Definition at line 153 of file psmovement.h.

const psCharMode* psMovementManager::FindCharMode ( size_t  id) const [inline]

Definition at line 157 of file psmovement.h.

const psCharMode* psMovementManager::FindCharMode ( const char *  name) const
const psMovement* psMovementManager::FindMovement ( const char *  name) const
bool psMovementManager::GetInvertedMouse ( ) [inline]

Definition at line 182 of file psmovement.h.

const char* psMovementManager::GetModeIdleAnim ( size_t  id) const [inline]

Definition at line 156 of file psmovement.h.

bool psMovementManager::HandleEvent ( iEvent &  event)
void psMovementManager::HandleMessage ( MsgEntry me) [virtual]

Implements psClientNetSubscriber.

void psMovementManager::HandleMod ( psMoveModMsg msg) [protected]
bool psMovementManager::IsLocked ( ) [inline]

Definition at line 162 of file psmovement.h.

bool psMovementManager::IsReady ( ) [inline]

Ready to receive events?

Definition at line 161 of file psmovement.h.

void psMovementManager::LoadMouseSettings ( )
void psMovementManager::LockMoves ( bool  v)
void psMovementManager::MouseLook ( bool  v)
bool psMovementManager::MouseLook ( ) [inline]

Definition at line 189 of file psmovement.h.

void psMovementManager::MouseLook ( iEvent &  ev)
void psMovementManager::MouseLookCanAct ( bool  v)
bool psMovementManager::MouseLookCanAct ( ) [inline]

Definition at line 186 of file psmovement.h.

bool psMovementManager::MouseMove ( ) [inline]

Definition at line 198 of file psmovement.h.

void psMovementManager::MouseZoom ( bool  v) [inline]

Definition at line 193 of file psmovement.h.

bool psMovementManager::MouseZoom ( ) [inline]

Definition at line 194 of file psmovement.h.

void psMovementManager::MouseZoom ( iEvent &  ev)
bool psMovementManager::MoveStateChanged ( psMoveState state) [inline]

Definition at line 229 of file psmovement.h.

void psMovementManager::Push ( const psMovement move)

Use a movement once.

void psMovementManager::SaveMoveState ( psMoveState state) [inline]

Definition at line 222 of file psmovement.h.

void psMovementManager::SetActor ( GEMClientActor actor)
void psMovementManager::SetActorMode ( const psCharMode mode) [protected]
void psMovementManager::SetInvertedMouse ( bool  v) [inline]

Definition at line 181 of file psmovement.h.

void psMovementManager::SetMouseMove ( bool  v) [inline]

Definition at line 197 of file psmovement.h.

void psMovementManager::SetMouseSensX ( float  v) [inline]

Definition at line 179 of file psmovement.h.

void psMovementManager::SetMouseSensY ( float  v) [inline]

Definition at line 180 of file psmovement.h.

bool psMovementManager::SetRun ( bool  runState)

Set the character run mode.

True to enable run mode. False to disable.

Returns:
Return the current run state.
void psMovementManager::SetRunToPos ( psPoint mouse)
void psMovementManager::SetSneaking ( bool  v) [inline]

Definition at line 219 of file psmovement.h.

void psMovementManager::SetupControls ( ) [protected]
void psMovementManager::SetupMovements ( psMovementInfoMessage msg) [protected]
bool psMovementManager::Sneaking ( ) [inline]

Definition at line 220 of file psmovement.h.

void psMovementManager::Start ( const psCharMode mode)

Switch to a new mode.

void psMovementManager::Start ( const psMovement move)

Add a new movement.

void psMovementManager::Stop ( const psMovement move)

Stop an existing movement.

void psMovementManager::Stop ( const psCharMode mode)

Switch back to normal mode.

void psMovementManager::StopAllMovement ( )

Stops all movements, resets mode, cancels mousemove, and halts the actor.

void psMovementManager::StopControlledMovement ( )

Stops all user applied movements/modes (does not halt actor if falling or mousemove)

void psMovementManager::ToggleAutoMove ( )
bool psMovementManager::ToggleRun ( )

Toggle the character run mode.

Returns:
Return the current run state.
void psMovementManager::UpdateMouseLook ( )
void psMovementManager::UpdateRunTo ( )
void psMovementManager::UpdateVelocity ( ) [protected]

Member Data Documentation

Definition at line 114 of file psmovement.h.

Definition at line 113 of file psmovement.h.

Bit mask for active moves.

Definition at line 96 of file psmovement.h.

Actor we're moving here.

Definition at line 92 of file psmovement.h.

Current active mode.

Definition at line 94 of file psmovement.h.

bool psMovementManager::autoMove [protected]

Definition at line 116 of file psmovement.h.

Definition at line 139 of file psmovement.h.

Definition at line 104 of file psmovement.h.

Default actor mode.

Definition at line 90 of file psmovement.h.

csEventID psMovementManager::event_frame [protected]

Definition at line 135 of file psmovement.h.

csEventID psMovementManager::event_mousemove [protected]

Definition at line 136 of file psmovement.h.

Definition at line 138 of file psmovement.h.

Definition at line 131 of file psmovement.h.

uint psMovementManager::kbdRotate [protected]

Definition at line 143 of file psmovement.h.

Definition at line 132 of file psmovement.h.

Definition at line 133 of file psmovement.h.

Definition at line 125 of file psmovement.h.

bool psMovementManager::locked [protected]

Is this player allowed to move?

Definition at line 102 of file psmovement.h.

csPDelArray<psCharMode> psMovementManager::modes [protected]

All available character modes.

Definition at line 87 of file psmovement.h.

Definition at line 123 of file psmovement.h.

bool psMovementManager::mouseLook [protected]

Definition at line 118 of file psmovement.h.

Definition at line 119 of file psmovement.h.

bool psMovementManager::mouseMove [protected]

Definition at line 121 of file psmovement.h.

bool psMovementManager::mouseZoom [protected]

Definition at line 120 of file psmovement.h.

Current total of all active move velocities.

Definition at line 97 of file psmovement.h.

csPDelArray<psMovement> psMovementManager::moves [protected]

All available movement types.

Definition at line 88 of file psmovement.h.

bool psMovementManager::onGround [protected]

Is actor on ground or airborne?

Definition at line 95 of file psmovement.h.

bool psMovementManager::ready [protected]

Have movements been setup?

Definition at line 101 of file psmovement.h.

const psCharMode* psMovementManager::run [protected]

Definition at line 140 of file psmovement.h.

csVector3 psMovementManager::runToDiff [protected]

Definition at line 126 of file psmovement.h.

Definition at line 124 of file psmovement.h.

Definition at line 130 of file psmovement.h.

Definition at line 129 of file psmovement.h.

bool psMovementManager::sneaking [protected]

Definition at line 122 of file psmovement.h.

bool psMovementManager::toggleRun [protected]

Definition at line 117 of file psmovement.h.

const psCharMode* psMovementManager::walk [protected]

Definition at line 141 of file psmovement.h.


The documentation for this class was generated from the following file: