Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Locomotor Class Reference

#include <Locomotor.h>

Inherits MemoryPoolObject, and Snapshot.

Public Member Functions

void setPhysicsOptions (Object *obj)
 
void locoUpdate_moveTowardsPosition (Object *obj, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed, Bool *blocked)
 
void locoUpdate_moveTowardsAngle (Object *obj, Real angle)
 
Bool locoUpdate_maintainCurrentPosition (Object *obj)
 
Real getMaxSpeedForCondition (BodyDamageType condition) const
 get max speed given condition
 
Real getMaxTurnRate (BodyDamageType condition) const
 get max turning rate given condition
 
Real getMaxAcceleration (BodyDamageType condition) const
 get acceleration given condition
 
Real getMaxLift (BodyDamageType condition) const
 get acceleration given condition
 
Real getBraking () const
 get braking given condition
 
Real getPreferredHeight () const
 Just return preferredheight, no damage consideration.
 
void restorePreferredHeightFromTemplate ()
 
Real getPreferredHeightDamping () const
 
LocomotorAppearance getAppearance () const
 
LocomotorPriority getMovePriority () const
 
LocomotorSurfaceTypeMask getLegalSurfaces () const
 
AsciiString getTemplateName () const
 
Real getMinSpeed () const
 
Real getAccelPitchLimit () const
 Maximum amount we will pitch up or down under acceleration (including recoil.)
 
Real getDecelPitchLimit () const
 Maximum amount we will pitch down under deceleration (including recoil.)
 
Real getBounceKick () const
 How much simulating rough terrain "bounces" a wheel up.
 
Real getPitchStiffness () const
 How stiff the springs are forward & back.
 
Real getRollStiffness () const
 How stiff the springs are side to side.
 
Real getPitchDamping () const
 How good the shock absorbers are.
 
Real getRollDamping () const
 How good the shock absorbers are.
 
Real getPitchByZVelCoef () const
 How much we pitch in response to speed.
 
Real getThrustRoll () const
 Thrust roll.
 
Real getWobbleRate () const
 how fast thrust things "wobble"
 
Real getMaxWobble () const
 how much thrust things "wobble"
 
Real getMinWobble () const
 how much thrust things "wobble"
 
Real getForwardVelCoef () const
 How much we pitch in response to speed.
 
Real getLateralVelCoef () const
 How much we roll in response to speed.
 
Real getForwardAccelCoef () const
 How much we pitch in response to acceleration.
 
Real getLateralAccelCoef () const
 How much we roll in response to acceleration.
 
Real getUniformAxialDamping () const
 How much we roll in response to acceleration.
 
Real getTurnPivotOffset () const
 
Bool getApply2DFrictionWhenAirborne () const
 
Bool getIsDownhillOnly () const
 
Bool getAllowMotiveForceWhileAirborne () const
 
Int getAirborneTargetingHeight () const
 
Bool getLocomotorWorksWhenDead () const
 
Bool getStickToGround () const
 
Real getCloseEnoughDist () const
 
Bool isCloseEnoughDist3D () const
 
Bool hasSuspension () const
 
Bool canMoveBackwards () const
 
Real getMaxWheelExtension () const
 
Real getMaxWheelCompression () const
 
Real getWheelTurnAngle () const
 
Real getRudderCorrectionDegree () const
 How much we roll in response to acceleration.
 
Real getRudderCorrectionRate () const
 How much we roll in response to acceleration.
 
Real getElevatorCorrectionDegree () const
 How much we roll in response to acceleration.
 
Real getElevatorCorrectionRate () const
 How much we roll in response to acceleration.
 
Real getWanderWidthFactor () const
 
Real getWanderAboutPointRadius () const
 
Real calcMinTurnRadius (BodyDamageType condition, Real *timeToTravelThatDist) const
 
void setMaxLift (Real lift)
 this is handy for doing things like forcing helicopters to crash realistically: cut their lift.
 
void setMaxSpeed (Real speed)
 
void setMaxAcceleration (Real accel)
 
void setMaxBraking (Real braking)
 
void setMaxTurnRate (Real turn)
 
void setAllowInvalidPosition (Bool allow)
 
void setCloseEnoughDist (Real dist)
 
void setCloseEnoughDist3D (Bool setting)
 
Bool isInvalidPositionAllowed () const
 
void setPreferredHeight (Real height)
 
void setUsePreciseZPos (Bool u)
 
void setNoSlowDownAsApproachingDest (Bool u)
 
void setUltraAccurate (Bool u)
 
Bool isUltraAccurate () const
 
Bool isMovingBackwards (void) const
 
void startMove (void)
 Indicates that a move is starting, primarily to reset the donut timer. jba.
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Member Functions

void moveTowardsPositionLegs (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionLegsWander (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionClimb (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionWheels (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionTreads (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionOther (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionHover (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionThrust (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void moveTowardsPositionWings (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos, Real onPathDistToGoal, Real desiredSpeed)
 
void maintainCurrentPositionThrust (Object *obj, PhysicsBehavior *physics)
 
void maintainCurrentPositionOther (Object *obj, PhysicsBehavior *physics)
 
void maintainCurrentPositionLegs (Object *obj, PhysicsBehavior *physics)
 
void maintainCurrentPositionWheels (Object *obj, PhysicsBehavior *physics)
 
void maintainCurrentPositionTreads (Object *obj, PhysicsBehavior *physics)
 
void maintainCurrentPositionHover (Object *obj, PhysicsBehavior *physics)
 
void maintainCurrentPositionWings (Object *obj, PhysicsBehavior *physics)
 
PhysicsTurningType rotateTowardsPosition (Object *obj, const Coord3D &goalPos, Real *relAngle=NULL)
 
Bool handleBehaviorZ (Object *obj, PhysicsBehavior *physics, const Coord3D &goalPos)
 
PhysicsTurningType rotateObjAroundLocoPivot (Object *obj, const Coord3D &goalPos, Real maxTurnRate, Real *relAngle=NULL)
 
Real getSurfaceHtAtPt (Real x, Real y)
 
Real calcLiftToUseAtPt (Object *obj, PhysicsBehavior *physics, Real curZ, Real surfaceAtPt, Real preferredHeight)
 
Bool fixInvalidPosition (Object *obj, PhysicsBehavior *physics)
 
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
 Locomotor (const LocomotorTemplate *tmpl)
 
 Locomotor (const Locomotor &that)
 
Locomotoroperator= (const Locomotor &that)
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Friends

class LocomotorStore
 

Detailed Description

Definition at line 221 of file Locomotor.h.

Constructor & Destructor Documentation

◆ Locomotor() [1/2]

Locomotor::Locomotor ( const LocomotorTemplate * tmpl)
protected

Definition at line 653 of file Locomotor.cpp.

◆ Locomotor() [2/2]

Locomotor::Locomotor ( const Locomotor & that)
protected

Definition at line 678 of file Locomotor.cpp.

Member Function Documentation

◆ calcLiftToUseAtPt()

Real Locomotor::calcLiftToUseAtPt ( Object * obj,
PhysicsBehavior * physics,
Real curZ,
Real surfaceAtPt,
Real preferredHeight )
protected

Definition at line 2046 of file Locomotor.cpp.

◆ calcMinTurnRadius()

Real Locomotor::calcMinTurnRadius ( BodyDamageType condition,
Real * timeToTravelThatDist ) const

Definition at line 1591 of file Locomotor.cpp.

◆ canMoveBackwards()

Bool Locomotor::canMoveBackwards ( ) const
inline

Definition at line 285 of file Locomotor.h.

◆ crc()

void Locomotor::crc ( Xfer * xfer)
protectedvirtual

CRC

Implements Snapshot.

Definition at line 736 of file Locomotor.cpp.

◆ fixInvalidPosition()

Bool Locomotor::fixInvalidPosition ( Object * obj,
PhysicsBehavior * physics )
protected

Definition at line 1524 of file Locomotor.cpp.

◆ getAccelPitchLimit()

Real Locomotor::getAccelPitchLimit ( ) const
inline

Maximum amount we will pitch up or down under acceleration (including recoil.)

Definition at line 257 of file Locomotor.h.

◆ getAirborneTargetingHeight()

Int Locomotor::getAirborneTargetingHeight ( ) const
inline

Definition at line 279 of file Locomotor.h.

◆ getAllowMotiveForceWhileAirborne()

Bool Locomotor::getAllowMotiveForceWhileAirborne ( ) const
inline

Definition at line 278 of file Locomotor.h.

◆ getAppearance()

LocomotorAppearance Locomotor::getAppearance ( ) const
inline

Definition at line 251 of file Locomotor.h.

◆ getApply2DFrictionWhenAirborne()

Bool Locomotor::getApply2DFrictionWhenAirborne ( ) const
inline

Definition at line 276 of file Locomotor.h.

◆ getBounceKick()

Real Locomotor::getBounceKick ( ) const
inline

How much simulating rough terrain "bounces" a wheel up.

Definition at line 259 of file Locomotor.h.

◆ getBraking()

Real Locomotor::getBraking ( ) const

get braking given condition

Definition at line 844 of file Locomotor.cpp.

◆ getCloseEnoughDist()

Real Locomotor::getCloseEnoughDist ( ) const
inline

Definition at line 282 of file Locomotor.h.

◆ getDecelPitchLimit()

Real Locomotor::getDecelPitchLimit ( ) const
inline

Maximum amount we will pitch down under deceleration (including recoil.)

Definition at line 258 of file Locomotor.h.

◆ getElevatorCorrectionDegree()

Real Locomotor::getElevatorCorrectionDegree ( ) const
inline

How much we roll in response to acceleration.

Definition at line 293 of file Locomotor.h.

◆ getElevatorCorrectionRate()

Real Locomotor::getElevatorCorrectionRate ( ) const
inline

How much we roll in response to acceleration.

Definition at line 294 of file Locomotor.h.

◆ getForwardAccelCoef()

Real Locomotor::getForwardAccelCoef ( ) const
inline

How much we pitch in response to acceleration.

Definition at line 272 of file Locomotor.h.

◆ getForwardVelCoef()

Real Locomotor::getForwardVelCoef ( ) const
inline

How much we pitch in response to speed.

Definition at line 270 of file Locomotor.h.

◆ getIsDownhillOnly()

Bool Locomotor::getIsDownhillOnly ( ) const
inline

Definition at line 277 of file Locomotor.h.

◆ getLateralAccelCoef()

Real Locomotor::getLateralAccelCoef ( ) const
inline

How much we roll in response to acceleration.

Definition at line 273 of file Locomotor.h.

◆ getLateralVelCoef()

Real Locomotor::getLateralVelCoef ( ) const
inline

How much we roll in response to speed.

Definition at line 271 of file Locomotor.h.

◆ getLegalSurfaces()

LocomotorSurfaceTypeMask Locomotor::getLegalSurfaces ( ) const
inline

Definition at line 253 of file Locomotor.h.

◆ getLocomotorWorksWhenDead()

Bool Locomotor::getLocomotorWorksWhenDead ( ) const
inline

Definition at line 280 of file Locomotor.h.

◆ getMaxAcceleration()

Real Locomotor::getMaxAcceleration ( BodyDamageType condition) const

get acceleration given condition

Definition at line 828 of file Locomotor.cpp.

◆ getMaxLift()

Real Locomotor::getMaxLift ( BodyDamageType condition) const

get acceleration given condition

Definition at line 855 of file Locomotor.cpp.

◆ getMaxSpeedForCondition()

Real Locomotor::getMaxSpeedForCondition ( BodyDamageType condition) const

get max speed given condition

Definition at line 792 of file Locomotor.cpp.

◆ getMaxTurnRate()

Real Locomotor::getMaxTurnRate ( BodyDamageType condition) const

get max turning rate given condition

Definition at line 808 of file Locomotor.cpp.

◆ getMaxWheelCompression()

Real Locomotor::getMaxWheelCompression ( ) const
inline

Definition at line 287 of file Locomotor.h.

◆ getMaxWheelExtension()

Real Locomotor::getMaxWheelExtension ( ) const
inline

Definition at line 286 of file Locomotor.h.

◆ getMaxWobble()

Real Locomotor::getMaxWobble ( ) const
inline

how much thrust things "wobble"

Definition at line 267 of file Locomotor.h.

◆ getMinSpeed()

Real Locomotor::getMinSpeed ( ) const
inline

Definition at line 256 of file Locomotor.h.

◆ getMinWobble()

Real Locomotor::getMinWobble ( ) const
inline

how much thrust things "wobble"

Definition at line 268 of file Locomotor.h.

◆ getMovePriority()

LocomotorPriority Locomotor::getMovePriority ( ) const
inline

Definition at line 252 of file Locomotor.h.

◆ getPitchByZVelCoef()

Real Locomotor::getPitchByZVelCoef ( ) const
inline

How much we pitch in response to speed.

Definition at line 264 of file Locomotor.h.

◆ getPitchDamping()

Real Locomotor::getPitchDamping ( ) const
inline

How good the shock absorbers are.

Definition at line 262 of file Locomotor.h.

◆ getPitchStiffness()

Real Locomotor::getPitchStiffness ( ) const
inline

How stiff the springs are forward & back.

Definition at line 260 of file Locomotor.h.

◆ getPreferredHeight()

Real Locomotor::getPreferredHeight ( ) const
inline

Just return preferredheight, no damage consideration.

Definition at line 248 of file Locomotor.h.

◆ getPreferredHeightDamping()

Real Locomotor::getPreferredHeightDamping ( ) const
inline

Definition at line 250 of file Locomotor.h.

◆ getRollDamping()

Real Locomotor::getRollDamping ( ) const
inline

How good the shock absorbers are.

Definition at line 263 of file Locomotor.h.

◆ getRollStiffness()

Real Locomotor::getRollStiffness ( ) const
inline

How stiff the springs are side to side.

Definition at line 261 of file Locomotor.h.

◆ getRudderCorrectionDegree()

Real Locomotor::getRudderCorrectionDegree ( ) const
inline

How much we roll in response to acceleration.

Definition at line 291 of file Locomotor.h.

◆ getRudderCorrectionRate()

Real Locomotor::getRudderCorrectionRate ( ) const
inline

How much we roll in response to acceleration.

Definition at line 292 of file Locomotor.h.

◆ getStickToGround()

Bool Locomotor::getStickToGround ( ) const
inline

Definition at line 281 of file Locomotor.h.

◆ getSurfaceHtAtPt()

Real Locomotor::getSurfaceHtAtPt ( Real x,
Real y )
protected

Definition at line 2031 of file Locomotor.cpp.

◆ getTemplateName()

AsciiString Locomotor::getTemplateName ( ) const
inline

Definition at line 255 of file Locomotor.h.

◆ getThrustRoll()

Real Locomotor::getThrustRoll ( ) const
inline

Thrust roll.

Definition at line 265 of file Locomotor.h.

◆ getTurnPivotOffset()

Real Locomotor::getTurnPivotOffset ( ) const
inline

Definition at line 275 of file Locomotor.h.

◆ getUniformAxialDamping()

Real Locomotor::getUniformAxialDamping ( ) const
inline

How much we roll in response to acceleration.

Definition at line 274 of file Locomotor.h.

◆ getWanderAboutPointRadius()

Real Locomotor::getWanderAboutPointRadius ( ) const
inline

Definition at line 298 of file Locomotor.h.

◆ getWanderWidthFactor()

Real Locomotor::getWanderWidthFactor ( ) const
inline

Definition at line 297 of file Locomotor.h.

◆ getWheelTurnAngle()

Real Locomotor::getWheelTurnAngle ( ) const
inline

Definition at line 288 of file Locomotor.h.

◆ getWobbleRate()

Real Locomotor::getWobbleRate ( ) const
inline

how fast thrust things "wobble"

Definition at line 266 of file Locomotor.h.

◆ handleBehaviorZ()

Bool Locomotor::handleBehaviorZ ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos )
protected

Definition at line 2220 of file Locomotor.cpp.

◆ hasSuspension()

Bool Locomotor::hasSuspension ( ) const
inline

Definition at line 284 of file Locomotor.h.

◆ isCloseEnoughDist3D()

Bool Locomotor::isCloseEnoughDist3D ( ) const
inline

Definition at line 283 of file Locomotor.h.

◆ isInvalidPositionAllowed()

Bool Locomotor::isInvalidPositionAllowed ( ) const
inline

Definition at line 315 of file Locomotor.h.

◆ isMovingBackwards()

Bool Locomotor::isMovingBackwards ( void ) const
inline

Definition at line 360 of file Locomotor.h.

◆ isUltraAccurate()

Bool Locomotor::isUltraAccurate ( ) const
inline

Definition at line 358 of file Locomotor.h.

◆ loadPostProcess()

void Locomotor::loadPostProcess ( void )
protectedvirtual

Load post process

Implements Snapshot.

Definition at line 779 of file Locomotor.cpp.

◆ locoUpdate_maintainCurrentPosition()

Bool Locomotor::locoUpdate_maintainCurrentPosition ( Object * obj)

Kill any current (2D) velocity (but stay at current position, or as close as possible)

return true if we can maintain the position without being called every frame (eg, we are resting on the ground), false if not (eg, we are hovering or circling)

Definition at line 2436 of file Locomotor.cpp.

◆ locoUpdate_moveTowardsAngle()

void Locomotor::locoUpdate_moveTowardsAngle ( Object * obj,
Real angle )

Definition at line 871 of file Locomotor.cpp.

◆ locoUpdate_moveTowardsPosition()

void Locomotor::locoUpdate_moveTowardsPosition ( Object * obj,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed,
Bool * blocked )

Definition at line 953 of file Locomotor.cpp.

◆ maintainCurrentPositionHover()

void Locomotor::maintainCurrentPositionHover ( Object * obj,
PhysicsBehavior * physics )
protected

Definition at line 2551 of file Locomotor.cpp.

◆ maintainCurrentPositionLegs()

void Locomotor::maintainCurrentPositionLegs ( Object * obj,
PhysicsBehavior * physics )
inlineprotected

Definition at line 377 of file Locomotor.h.

◆ maintainCurrentPositionOther()

void Locomotor::maintainCurrentPositionOther ( Object * obj,
PhysicsBehavior * physics )
protected

Definition at line 2603 of file Locomotor.cpp.

◆ maintainCurrentPositionThrust()

void Locomotor::maintainCurrentPositionThrust ( Object * obj,
PhysicsBehavior * physics )
protected
Todo
srj – should these also use the "circling radius" stuff, like wings?

Definition at line 2504 of file Locomotor.cpp.

◆ maintainCurrentPositionTreads()

void Locomotor::maintainCurrentPositionTreads ( Object * obj,
PhysicsBehavior * physics )
inlineprotected

Definition at line 379 of file Locomotor.h.

◆ maintainCurrentPositionWheels()

void Locomotor::maintainCurrentPositionWheels ( Object * obj,
PhysicsBehavior * physics )
inlineprotected

Definition at line 378 of file Locomotor.h.

◆ maintainCurrentPositionWings()

void Locomotor::maintainCurrentPositionWings ( Object * obj,
PhysicsBehavior * physics )
protected

Definition at line 2512 of file Locomotor.cpp.

◆ moveTowardsPositionClimb()

void Locomotor::moveTowardsPositionClimb ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 1714 of file Locomotor.cpp.

◆ moveTowardsPositionHover()

void Locomotor::moveTowardsPositionHover ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 1887 of file Locomotor.cpp.

◆ moveTowardsPositionLegs()

void Locomotor::moveTowardsPositionLegs ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 1618 of file Locomotor.cpp.

◆ moveTowardsPositionLegsWander()

void Locomotor::moveTowardsPositionLegsWander ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

◆ moveTowardsPositionOther()

void Locomotor::moveTowardsPositionOther ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 2350 of file Locomotor.cpp.

◆ moveTowardsPositionThrust()

void Locomotor::moveTowardsPositionThrust ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 1915 of file Locomotor.cpp.

◆ moveTowardsPositionTreads()

void Locomotor::moveTowardsPositionTreads ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 1168 of file Locomotor.cpp.

◆ moveTowardsPositionWheels()

void Locomotor::moveTowardsPositionWheels ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 1282 of file Locomotor.cpp.

◆ moveTowardsPositionWings()

void Locomotor::moveTowardsPositionWings ( Object * obj,
PhysicsBehavior * physics,
const Coord3D & goalPos,
Real onPathDistToGoal,
Real desiredSpeed )
protected

Definition at line 1845 of file Locomotor.cpp.

◆ operator=()

Locomotor & Locomotor::operator= ( const Locomotor & that)
protected

Definition at line 706 of file Locomotor.cpp.

◆ restorePreferredHeightFromTemplate()

void Locomotor::restorePreferredHeightFromTemplate ( )
inline

Definition at line 249 of file Locomotor.h.

◆ rotateObjAroundLocoPivot()

PhysicsTurningType Locomotor::rotateObjAroundLocoPivot ( Object * obj,
const Coord3D & goalPos,
Real maxTurnRate,
Real * relAngle = NULL )
protected
Todo
srj – there's probably a more efficient & more direct way to do this. find it.

Definition at line 2137 of file Locomotor.cpp.

◆ rotateTowardsPosition()

PhysicsTurningType Locomotor::rotateTowardsPosition ( Object * obj,
const Coord3D & goalPos,
Real * relAngle = NULL )
protected

Definition at line 925 of file Locomotor.cpp.

◆ setAllowInvalidPosition()

void Locomotor::setAllowInvalidPosition ( Bool allow)
inline

Definition at line 312 of file Locomotor.h.

◆ setCloseEnoughDist()

void Locomotor::setCloseEnoughDist ( Real dist)
inline

Definition at line 313 of file Locomotor.h.

◆ setCloseEnoughDist3D()

void Locomotor::setCloseEnoughDist3D ( Bool setting)
inline

Definition at line 314 of file Locomotor.h.

◆ setMaxAcceleration()

void Locomotor::setMaxAcceleration ( Real accel)
inline

Definition at line 309 of file Locomotor.h.

◆ setMaxBraking()

void Locomotor::setMaxBraking ( Real braking)
inline

Definition at line 310 of file Locomotor.h.

◆ setMaxLift()

void Locomotor::setMaxLift ( Real lift)
inline

this is handy for doing things like forcing helicopters to crash realistically: cut their lift.

Definition at line 303 of file Locomotor.h.

◆ setMaxSpeed()

void Locomotor::setMaxSpeed ( Real speed)
inline

Definition at line 304 of file Locomotor.h.

◆ setMaxTurnRate()

void Locomotor::setMaxTurnRate ( Real turn)
inline

Definition at line 311 of file Locomotor.h.

◆ setNoSlowDownAsApproachingDest()

void Locomotor::setNoSlowDownAsApproachingDest ( Bool u)
inline

when off (the default), units slow down as they approach their target.

when on, units go full speed till the end, and may overshoot their target. this is useful mainly in some weird, temporary situations where we know we are going to follow this move with another one... or for carbombs.

Definition at line 344 of file Locomotor.h.

◆ setPhysicsOptions()

void Locomotor::setPhysicsOptions ( Object * obj)

Definition at line 935 of file Locomotor.cpp.

◆ setPreferredHeight()

void Locomotor::setPreferredHeight ( Real height)
inline

Definition at line 317 of file Locomotor.h.

◆ setUltraAccurate()

void Locomotor::setUltraAccurate ( Bool u)
inline

when off (the default), units do their normal stuff.

when on, we cheat and make very precise motion, regardless of loco settings. this is accomplished by cranking up the unit's turning rate, friction, lift (for airborne things), and possibly other things. This is useful mainly when doing maneuvers where precision is VITAL, such as airplane takeoff/landing.

For ground units, it also allows units to have a destination off of a pathfing grid.

Definition at line 357 of file Locomotor.h.

◆ setUsePreciseZPos()

void Locomotor::setUsePreciseZPos ( Bool u)
inline

when off (the default), things get to adjust their z-pos as their loco says (in particular, airborne things tend to try to fly at a preferred height).

when on, they do their best to reach the specified zpos, even if it's not at their preferred height. this is used mainly for force missiles to swoop in on their target, and to force airplane takeoff/landing to go smoothly.

Definition at line 335 of file Locomotor.h.

◆ startMove()

void Locomotor::startMove ( void )

Indicates that a move is starting, primarily to reset the donut timer. jba.

Definition at line 785 of file Locomotor.cpp.

◆ xfer()

void Locomotor::xfer ( Xfer * xfer)
protectedvirtual

Xfer method Version Info: 1: Initial version

Implements Snapshot.

Definition at line 746 of file Locomotor.cpp.

Friends And Related Symbol Documentation

◆ LocomotorStore

friend class LocomotorStore
friend

Definition at line 225 of file Locomotor.h.


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