|
| Plunger (AbstractKart *kart) |
|
virtual bool | updateAndDelete (int ticks) OVERRIDE |
| Updates the plunger in each frame.
|
|
virtual void | hitTrack () OVERRIDE |
| Called when the plunger hits the track.
|
|
virtual bool | hit (AbstractKart *kart, PhysicalObject *obj=NULL) OVERRIDE |
| Virtual function called when the plunger hits something.
|
|
void | updateGraphics (float dt) OVERRIDE |
| Called once per rendered frame.
|
|
void | setKeepAlive (int16_t ticks) |
| Sets the keep-alive value.
|
|
virtual HitEffect * | getHitEffect () const OVERRIDE |
| No hit effect when it ends.
|
|
virtual BareNetworkString * | saveState (std::vector< std::string > *ru) OVERRIDE |
| Provides a copy of the state of the object in one memory buffer.
|
|
virtual void | restoreState (BareNetworkString *buffer, int count) OVERRIDE |
| Called when a state needs to be replayed.
|
|
virtual void | onFireFlyable () OVERRIDE |
| Call when the item is (re-)fired (during rewind if needed) by projectile_manager.
|
|
virtual void | onDeleteFlyable () OVERRIDE |
|
| Flyable (AbstractKart *kart, PowerupManager::PowerupType type, float mass=1.0f) |
|
void | updateGraphics (float dt) OVERRIDE |
| Called once per rendered frame.
|
|
virtual bool | updateAndDelete (int ticks) |
| Updates this flyable.
|
|
virtual void | setAnimation (AbstractKartAnimation *animation) |
|
virtual HitEffect * | getHitEffect () const |
| Returns the hit effect object to use when this objects hits something.
|
|
bool | isOwnerImmunity (const AbstractKart *kart_hit) const |
| Returns true if the item hit the kart who shot it (to avoid that an item that's too close to the shooter hits the shooter).
|
|
virtual bool | hit (AbstractKart *kart, PhysicalObject *obj=NULL) |
| Callback from the physics in case that a kart or physical object is hit.
|
|
void | explode (AbstractKart *kart, PhysicalObject *obj=NULL, bool secondary_hits=true) |
| Creates the explosion physical effect, i.e.
|
|
unsigned int | getOwnerId () |
|
bool | hasAnimation () const |
| Returns if this flyable has an animation playing (e.g.
|
|
void | setAdjustUpVelocity (bool f) |
| If true the up velocity of the flyable will be adjust so that the flyable stays at a height close to the average height.
|
|
void | setPositionOffset (const Vec3 &o) |
| Sets the offset to be used when determining the terrain under the flyable.
|
|
virtual void | hitTrack () |
| Called when this flyable hits the track.
|
|
bool | hasHit () |
| Enables/disables adjusting ov velocity depending on height above terrain.
|
|
void | setHasHit () |
| Indicates that something was hit and that this object must be removed.
|
|
void | reset () OVERRIDE |
| Resets this flyable.
|
|
PowerupManager::PowerupType | getType () const |
| Returns the type of flyable.
|
|
AbstractKart * | getOwner () const |
| Returns the owner's kart.
|
|
void | setDoTerrainInfo (bool d) |
| Sets wether Flyable should update TerrainInfo as part of its update call, or if the inheriting object will update TerrainInfo itself (or perhaps not at all if it is not needed).
|
|
const Vec3 & | getExtend () const |
| Returns the size (extend) of the mesh.
|
|
void | addForRewind (const std::string &uid) |
|
virtual void | undoEvent (BareNetworkString *buffer) OVERRIDE |
| Called when an event needs to be undone.
|
|
virtual void | rewindToEvent (BareNetworkString *buffer) OVERRIDE |
| Called when an event needs to be replayed.
|
|
virtual void | undoState (BareNetworkString *buffer) OVERRIDE |
| Undo the effects of the given state, but do not rewind to that state (which is done by rewindTo).
|
|
virtual void | saveTransform () OVERRIDE |
| Called before a rewind.
|
|
virtual void | computeError () OVERRIDE |
| Called when a rewind is finished, and is used to compute the error caused by the rewind (which is then visually smoothed over time).
|
|
virtual BareNetworkString * | saveState (std::vector< std::string > *ru) OVERRIDE |
| Provides a copy of the state of the object in one memory buffer.
|
|
virtual void | restoreState (BareNetworkString *buffer, int count) OVERRIDE |
| Called when a state needs to be replayed.
|
|
bool | hasServerState () const |
|
virtual void | onFireFlyable () |
| Call when the item is (re-)fired (during rewind if needed) by projectile_manager.
|
|
virtual void | onDeleteFlyable () |
|
void | setCreatedTicks (int ticks) |
|
scene::ISceneNode * | getNode () const |
| Returns the scene node of this moveable.
|
|
void | setNode (scene::ISceneNode *n) |
| Sets the mesh for this model.
|
|
virtual const btVector3 & | getVelocity () const |
|
const btVector3 & | getVelocityLC () const |
|
virtual void | setVelocity (const btVector3 &v) |
|
const Vec3 & | getXYZ () const |
|
float | getHeading () const |
| Returns the heading between -pi and pi.
|
|
float | getPitch () const |
| Returns the pitch of the kart, restricted to between -pi/2 and pi/2.
|
|
float | getRoll () const |
| Returns the roll of the kart between -pi and pi.
|
|
const btQuaternion | getRotation () const |
|
virtual void | flyUp () |
| Enter flying mode.
|
|
virtual void | flyDown () |
|
virtual void | stopFlying () |
|
virtual void | setXYZ (const Vec3 &a) |
| Sets the XYZ coordinates of the moveable.
|
|
void | setRotation (const btMatrix3x3 &m) |
| Sets the rotation of the physical body this moveable.
|
|
void | setRotation (const btQuaternion &q) |
| Sets the rotation of the physical body this moveable.
|
|
virtual void | reset () |
| The reset position must be set before calling reset.
|
|
virtual void | update (int ticks) |
| Updates the current position and rotation from the corresponding physics body, and then calls updateGraphics to position the model correctly.
|
|
btRigidBody * | getBody () const |
|
void | createBody (float mass, btTransform &trans, btCollisionShape *shape, float restitution) |
| Creates the bullet rigid body for this moveable.
|
|
const btTransform & | getTrans () const |
|
void | setTrans (const btTransform &t) |
| Places this moveable at a certain location and stores this transform in this Moveable, so that it can be accessed easily.
|
|
void | updatePosition () |
| Updates the current position and rotation.
|
|
virtual void | updateGraphics (float dt)=0 |
| Called once per rendered frame.
|
|
void | prepareSmoothing () |
|
void | checkSmoothing () |
|
const btTransform & | getSmoothedTrans () const |
|
const Vec3 & | getSmoothedXYZ () const |
|
virtual const std::string & | getIdent () const |
|
Public Member Functions inherited from SmoothNetworkBody |
| SmoothNetworkBody (bool enable=false) |
|
void | reset () |
|
void | setEnable (bool val) |
|
bool | isEnabled () const |
|
void | setSmoothRotation (bool val) |
|
void | setAdjustVerticalOffset (bool val) |
|
void | prepareSmoothing (const btTransform ¤t_transform, const Vec3 ¤t_velocity) |
|
void | checkSmoothing (const btTransform ¤t_transform, const Vec3 ¤t_velocity) |
| Adds a new error between graphical and physical position/rotation.
|
|
void | updateSmoothedGraphics (const btTransform ¤t_transform, const Vec3 ¤t_velocity, float dt) |
|
void | setSmoothedTransform (const btTransform &t) |
|
const btTransform & | getSmoothedTrans () const |
|
const Vec3 & | getSmoothedXYZ () const |
|
void | setMinAdjustLength (float val) |
|
void | setMaxAdjustLength (float val) |
|
void | setMinAdjustSpeed (float val) |
|
void | setMaxAdjustTime (float val) |
|
void | setAdjustLengthThreshold (float val) |
|
| TerrainInfo () |
| Constructor to initialise terrain data.
|
|
| TerrainInfo (const Vec3 &pos) |
| Constructor to initialise terrain data at a given position.
|
|
bool | getSurfaceInfo (const Vec3 &from, Vec3 *position, const Material **m) |
| Does a raycast upwards from the given position If the raycast indicated that the kart is 'under something' (i.e.
|
|
virtual void | update (const btMatrix3x3 &rotation, const Vec3 &from) |
| Update the terrain information based on the latest position.
|
|
virtual void | update (const Vec3 &from) |
| Update the terrain information based on the latest position.
|
|
virtual void | update (const Vec3 &from, const Vec3 &towards) |
| Update the terrain information based on the latest position.
|
|
virtual void | update (const btMatrix3x3 &rotation) |
| Simple wrapper with no offset.
|
|
float | getHoT () const |
| Returns the height of the terrain.
|
|
const Material * | getMaterial () const |
| Returns the current material the kart is on.
|
|
const Material * | getLastMaterial () const |
| Returns the previous material the kart was one (which might be the same as getMaterial() ).
|
|
const Vec3 & | getNormal () const |
| Returns the normal of the terrain the kart is on.
|
|
float | getTerrainPitch (float heading) const |
| Returns the pitch of the terrain depending on the heading.
|
|
const btVector3 & | getHitPoint () const |
| Returns the hit point of the raycast.
|
|
const Vec3 & | getOrigin () const |
|
| Rewinder (const std::string &ui="") |
|
virtual void | saveTransform ()=0 |
| Called before a rewind.
|
|
virtual void | computeError ()=0 |
| Called when a rewind is finished, and is used to compute the error caused by the rewind (which is then visually smoothed over time).
|
|
virtual BareNetworkString * | saveState (std::vector< std::string > *ru)=0 |
| Provides a copy of the state of the object in one memory buffer.
|
|
virtual void | undoEvent (BareNetworkString *buffer)=0 |
| Called when an event needs to be undone.
|
|
virtual void | rewindToEvent (BareNetworkString *buffer)=0 |
| Called when an event needs to be replayed.
|
|
virtual void | restoreState (BareNetworkString *buffer, int count)=0 |
| Called when a state needs to be replayed.
|
|
virtual void | undoState (BareNetworkString *buffer)=0 |
| Undo the effects of the given state, but do not rewind to that state (which is done by rewindTo).
|
|
virtual void | reset () |
| Nothing to do here.
|
|
virtual std::function< void()> | getLocalStateRestoreFunction () |
|
const std::string & | getUniqueIdentity () const |
|
bool | rewinderAdd () |
| Add this object to the list of all rewindable objects in the rewind manager.
|
|
template<typename T > |
std::shared_ptr< T > | getShared () |
|
|
void | getClosestKart (const AbstractKart **minKart, float *minDistSquared, Vec3 *minDelta, const AbstractKart *inFrontOf=NULL, const bool backwards=false) const |
| Returns information on what is the closest kart and at what distance it is.
|
|
void | getLinearKartItemIntersection (const Vec3 &origin, const AbstractKart *target_kart, float item_XY_velocity, float gravity, float forw_offset, float *fire_angle, float *up_velocity) |
| Returns information on the parameters needed to hit a target kart moving at constant velocity and direction for a given speed in the XZ-plane.
|
|
void | createPhysics (float y_offset, const Vec3 &velocity, btCollisionShape *shape, float restitution, const btVector3 &gravity=btVector3(0.0f, 0.0f, 0.0f), const bool rotates=false, const bool turn_around=false, const btTransform *customDirection=NULL) |
| init bullet for moving objects like projectiles
|
|
void | moveToInfinity (bool set_moveable_trans=true) |
| It's called when undoing the creation or destruction of flyables, so that it will not affected the current game, and it will be deleted in computeError.
|
|
void | removePhysics () |
|
void | fixSFXSplitscreen (SFXBase *sfx) |
|
void | updateSmoothedGraphics (float dt) |
|
virtual void | updateGraphics (const Vec3 &off_xyz=Vec3(0.0f, 0.0f, 0.0f), const btQuaternion &off_rotation=btQuaternion(0.0f, 0.0f, 0.0f, 1.0f)) |
| Updates the graphics model.
|
|
void | setUniqueIdentity (const std::string &uid) |
|
AbstractKart * | m_owner |
| Kart which shot this flyable.
|
|
PowerupManager::PowerupType | m_type |
| Type of the powerup.
|
|
btCollisionShape * | m_shape |
| Collision shape of this Flyable.
|
|
float | m_max_height |
| Maximum height above terrain.
|
|
float | m_min_height |
| Minimum height above terrain.
|
|
float | m_average_height |
| Average of average of m_{min,ax}_height.
|
|
float | m_force_updown |
| Force pushing the Flyable up.
|
|
float | m_speed |
| Speed of this Flyable.
|
|
const float | m_mass |
| Mass of this Flyable.
|
|
Vec3 | m_extend |
| Size of this flyable.
|
|
uint16_t | m_ticks_since_thrown |
| Time since thrown.
|
|
bool | m_has_server_state |
|
bool | m_owner_has_temporary_immunity |
| If set to true, the kart that throwns this flyable can't collide with it for a short time.
|
|
bool | m_deleted_once |
|
int | m_last_deleted_ticks |
|
int | m_max_lifespan |
| Set to something > -1 if this flyable should auto-destrcut after that may ticks.
|
|
int | m_created_ticks |
|
btTransform | m_transform |
| The bullet transform of this rigid body.
|
|
UserPointer | m_user_pointer |
|
scene::ISceneNode * | m_node |
|
std::unique_ptr< btRigidBody > | m_body |
|
std::unique_ptr< KartMotionState > | m_motion_state |
|
static float | m_st_speed [PowerupManager::POWERUP_MAX] |
| Speed of the projectile.
|
|
static scene::IMesh * | m_st_model [PowerupManager::POWERUP_MAX] |
| The mesh of this Flyable.
|
|
static float | m_st_min_height [PowerupManager::POWERUP_MAX] |
| Minimum height above track.
|
|
static float | m_st_max_height [PowerupManager::POWERUP_MAX] |
| Max height above track.
|
|
static float | m_st_force_updown [PowerupManager::POWERUP_MAX] |
| Force pushing up/down.
|
|
static Vec3 | m_st_extend [PowerupManager::POWERUP_MAX] |
| Size of the model.
|
|