#include <cmpPhysBiped.h>
Public Types | |
enum | eModifier { kModNone = 0, kModJump = 1, kModDuck } |
Modifies the movement. More... | |
Public Member Functions | |
CCmpPhysBiped (CGameEntity *pGE) | |
Create with default values. | |
unit | height (ENTITY *pEnt) |
Get the height above the nearest surface. | |
Virtual methods | |
virtual int | set (const EDIT_DATA &editData) |
Set a value. | |
virtual int | get (EDIT_DATA &editData) const |
Get a value. | |
virtual int | act (const ACTION_DATA &actData) |
Preform an action. | |
virtual void | update () |
Update this Cmp for a single frame. | |
Static Public Attributes | |
static const unit | kMaxHeight = 8 |
Max dist we scan down for a surface. | |
static const unit | kNearGround = 3 |
If entity is less than this height, it can touch the ground. | |
Default values | |
static const unit | kDefaultXForce = 8 |
Max force in the forward direction. | |
static const unit | kDefaultYForce = 5 |
Max force in the right/left directions. | |
static const unit | kDefaultAForce = 10 |
Turning force. | |
static const unit | kDefaultJumpHeight = 30 |
Distance we jump up. | |
static const unit | kDefaultDuckHeight = 16 |
Distance we duck down. | |
static const unit | kDefaultDuckForceScale = 0.35 |
Scale force down while ducking. | |
static const unit | kDefaultRunThreshold = 12 |
Speed at which we begin running (quants). |
Attach to any GE you want to move like a biped (person, robot, AT-ST, etc).
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
int CCmpPhysBiped::set | ( | const EDIT_DATA & | editData | ) | [virtual] |
Set a value.
If we have data of this type, use editData to set its value.
editData | Data type and value (see EDIT_DATA struct). |
Implements CCmp.
int CCmpPhysBiped::get | ( | EDIT_DATA & | editData | ) | const [virtual] |
Get a value.
If we have data of this type, use editData to get its value.
editData | Data type we are looking for, and memory to store value (see EDIT_DATA struct). |
Implements CCmp.
int CCmpPhysBiped::act | ( | const ACTION_DATA & | actData | ) | [virtual] |
Preform an action.
Handle the action passed in (ignore if we do not handle the action type).
actData | The data used to preform the action (see ACTION_DATA struct). |
Implements CCmp.
unit CCmpPhysBiped::height | ( | ENTITY * | pEnt | ) |
Get the height above the nearest surface.
Get the height above the nearest surface. If a surface or entity is hit, set the 'you' and 'normal' values.
If a surface or entity is hit, set the 'you' and 'normal' values.
pEnt | Pointer to source ENTITY |
pEnt | Pointer to source ENTITY |