Loading...
Searching...
No Matches
COldObject Class Reference
Inheritance diagram for COldObject:
[legend]

## Public Member Functions

| COldObject (int id)
void | Simplify () override
bool | DamageObject (DamageType type, float force=std::numeric_limits< float >::infinity(), CObject *killer=nullptr) override
| Damage the object, with the given force. Returns true if the object has been fully destroyed (assuming the object is destroyable, of course). If force == infinity, destroy immediately (this is the default value).
void | DestroyObject (DestructionType type, CObject *killer=nullptr) override
| Destroy the object immediately. Use this only if you are 100% sure this is what you want, because object with magnifyDamage=0 should be able to bypass all damage. It's recommended to use CDamageableObject::DamageObject() instead.
bool | EventProcess (const Event &event) override
void | UpdateMapping ()
void | DeletePart (int part) override
void | SetObjectRank (int part, int objRank)
int | GetObjectRank (int part) override
void | SetObjectParent (int part, int parent)
void | SetType (ObjectType type) override
const char * | GetName ()
int | GetOption () override
void | Write (CLevelParserLine *line) override
| Writes object properties to line in level file.
void | Read (CLevelParserLine *line) override
| Reads object properties from line in level file.
void | SetDrawFront (bool bDraw) override
int | GetShadowLight ()
void | SetFloorHeight (float height)
void | FloorAdjust () override
void | SetLinVibration (Math::Vector dir) override
Math::Vector | GetLinVibration ()
void | SetCirVibration (Math::Vector dir) override
Math::Vector | GetCirVibration ()
void | SetTilt (Math::Vector dir)
Math::Vector | GetTilt () override
void | SetPartPosition (int part, const Math::Vector &pos)
Math::Vector | GetPartPosition (int part) const
void | SetPartRotation (int part, const Math::Vector &angle)
Math::Vector | GetPartRotation (int part) const
void | SetPartRotationY (int part, float angle)
void | SetPartRotationX (int part, float angle)
void | SetPartRotationZ (int part, float angle)
float | GetPartRotationY (int part)
float | GetPartRotationX (int part)
float | GetPartRotationZ (int part)
void | SetPartScale (int part, float zoom)
void | SetPartScale (int part, Math::Vector zoom)
Math::Vector | GetPartScale (int part) const
void | SetPartScaleX (int part, float zoom)
float | GetPartScaleX (int part)
void | SetPartScaleY (int part, float zoom)
float | GetPartScaleY (int part)
void | SetPartScaleZ (int part, float zoom)
float | GetPartScaleZ (int part)
void | SetTrainer (bool bEnable) override
| Disables remote control of an object (only programming allowed).
bool | GetTrainer () override
| Checks if remote control is disabled.
bool | GetPlusTrainer ()
void | SetToy (bool bEnable)
bool | GetToy ()
void | SetManual (bool bManual)
bool | GetManual ()
void | SetMasterParticle (int part, int parti) override
void | SetTransporter (CObject *transporter) override
| Set transporter object that transports this object.
CObject * | GetTransporter () override
| Return transported object.
void | SetTransporterPart (int part) override
Math::Matrix * | GetRotateMatrix (int part)
Math::Matrix * | GetWorldMatrix (int part) override
void | AdjustCamera (Math::Vector &eye, float &dirH, float &dirV, Math::Vector &lookat, Math::Vector &upVec, Gfx::CameraType type) override
| Adjust camera parameters for the given object.
Character * | GetCharacter () override
float | GetAbsTime ()
float | GetCapacity () override
| Return capacity of this power container.
bool | IsRechargeable () override
| Returns true if this power container can be recharged.
void | SetShield (float level) override
| Set shield level.
float | GetShield () override
| Get shield level.
void | SetRange (float delay) override
| Sets jet engine heating speed (bigger = slower, 0 for infinite).
float | GetRange () override
| Returns jet engine heating speed (bigger = slower, 0 for infinite).
void | SetReactorRange (float reactorRange) override
| Sets current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot).
float | GetReactorRange () override
| Returns current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot).
void | SetTransparency (float value) override
| Sets the transparency of object.
Math::Sphere | GetJostlingSphere () const override
bool | JostleObject (float force) override
void | SetVirusMode (bool bEnable) override
bool | GetVirusMode () override
void | SetCameraType (Gfx::CameraType type) override
| Set camera type for this object.
Gfx::CameraType | GetCameraType () override
| Return camera type for this object.
void | SetCameraLock (bool lock) override
| Disallow camera changes.
bool | GetCameraLock () override
| Check if camera changes are disallowed.
void | SetHighlight (bool highlight) override
| Highlights the object on mouse over.
void | SetSelect (bool select, bool bDisplayError=true) override
| Selects the object.
bool | GetSelect () override
| Checks if the object is selected.
void | SetSelectable (bool bMode)
bool | GetSelectable () override
| Returns true if the object is selectable.
void | SetUnderground (bool underground)
void | SetCheckToken (bool bMode)
bool | GetCheckToken ()
void | SetMagnifyDamage (float factor) override
| Set damage multiplier for the object (bigger = more damage, weaker shield).
float | GetMagnifyDamage () override
| Return damage multiplier for the object (bigger = more damage, weaker shield).
void | SetDamaging (bool damaging) override
| Set the status that means the object is currently taking damage.
bool | IsDamaging () override
| Is object currently taking damage?
void | SetDying (DeathType deathType) override
| Set the status that means the object is currently dying.
DeathType | GetDying () override
| Return object death type.
bool | IsDying () override
| Is object currently dying?
bool | GetActive () override
| Is this object active (not dead)?
bool | GetDetectable () override
| Is this object detectable (not dead and not underground)?
void | SetGunGoalV (float gunGoal)
void | SetGunGoalH (float gunGoal)
float | GetGunGoalV ()
float | GetGunGoalH ()
float | GetShowLimitRadius () override
| Return object operation radius for display after clicking UI button.
void | CreateSelectParticle ()
CPhysics * | GetPhysics () override
| Returns CPhysics instance associated with this object. If the object implements Movable interface, and type != OBJECT_TOTO, this can be assumed to be != nullptr.
CMotion * | GetMotion () override
| Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr.
CAuto * | GetAuto () override
bool | CreateShadowCircle (float radius, float intensity, Gfx::EngineShadowType type=Gfx::ENG_SHADOW_NORM)
bool | CreateShadowLight (float height, Gfx::Color color)
void | FlatParent () override
void | SetPosition (const Math::Vector &pos) override
| Sets object's position.
Math::Vector | GetPosition () const override
| Returns object's position.
void | SetRotation (const Math::Vector &rotation) override
| Sets object's rotation (Euler angles).
Math::Vector | GetRotation () const override
| Returns object's rotation (Euler angles).
void | SetScale (const Math::Vector &scale) override
| Sets objects's scale.
Math::Vector | GetScale () const override
| Returns object's scale.
void | UpdateInterface () override
| Updates all interface controls.
void | StopProgram () override
| Stop currently running program.
bool | GetTraceDown () override
| Is the pencil down?
void | SetTraceDown (bool down) override
| Put the drawing pencil down.
TraceColor | GetTraceColor () override
| Return color of the trace.
void | SetTraceColor (TraceColor color) override
| Set color of the trace.
float | GetTraceWidth () override
| Return trace width.
void | SetTraceWidth (float width) override
| Set trace width.
bool | IsRepairable () override
| Returns true if this object can be repaired in RepairStation.
float | GetShieldFullRegenTime () override
| Return time (in seconds) required for full shield regeneration.
float | GetLightningHitProbability () override
| Returns the distance modifier for CLightning, used to modify hit probability. Value in range [0..1], where 0 is never and 1 is normal probability.
void | SetBulletWall (bool bulletWall)
bool | IsBulletWall () override
int | MapPseudoSlot (Pseudoslot pseudoslot) override
| Given one of the PSEUDOSLOT enums, returns real slot number, or -1 if specified pseudoslot is not present in this object.
int | GetNumSlots () override
| Get number of slots. Valid slot numbers are 0 up to GetNumSlots()-1. Using invalid slot numbers in the other functions will crash the game.
Math::Vector | GetSlotPosition (int slotNum) override
| Get relative position of a slot.
float | GetSlotAngle (int slotNum) override
| Get relative angle (in radians) where robot should be positioned when inserting into a slot.
float | GetSlotAcceptanceAngle (int slotNum) override
| Get the maximum angular distance from the ideal angle (in radians) where robot should be positioned when inserting into a slot.
CObject * | GetSlotContainedObject (int slotNum) override
| Get object contained in a slot.
void | SetSlotContainedObject (int slotNum, CObject *object) override
| Set object contained in a slot.
void | SetPowerPosition (const Math::Vector &powerPosition)
void | SetScale (float scale)
| Sets objects's scale (uniform value).
Public Member Functions inherited from CObject
| CObject (const CObject &)=delete
CObject & | operator= (const CObject &)=delete
ObjectType | GetType () const
| Returns object type.
int | GetID () const
| Returns object's unique id.
bool | Implements (ObjectInterfaceType type) const
| Check if object implements the given type of interface.
void | SetScale (float scale)
| Sets objects's scale (uniform value).
void | SetCrashSpheres (const std::vector< Gfx::ModelCrashSphere > &crashSpheres)
| Sets crash spheres for object.
void | AddCrashSphere (const CrashSphere &crashSphere)
| Adds a new crash sphere.
int | GetCrashSphereCount ()
| Returns total number of crash spheres.
CrashSphere | GetFirstCrashSphere ()
| Returns the first crash sphere (assumes it exists).
std::vector< CrashSphere > | GetAllCrashSpheres ()
| Returns all crash spheres.
void | DeleteAllCrashSpheres ()
| Removes all crash spheres.
bool | CanCollideWith (CObject *other)
| Returns true if this object can collide with the other one.
Math::Sphere | GetCameraCollisionSphere ()
| Returns sphere used to test for camera collisions.
void | SetCameraCollisionSphere (const Math::Sphere &sphere)
| Sets sphere used to test for camera collisions.
void | SetAnimateOnReset (bool animateOnReset)
| Sets flag controlling animation effect on level reset.
bool | GetAnimateOnReset ()
| Returns flag controlling animation effect on level reset.
void | SetCollisions (bool collisions)
| Turns object collisions on/off.
bool | GetCollisions ()
| Returns true if collisions are enabled.
void | SetTeam (int team)
| Sets object team (shouldn't be called after creation because the model won't update!).
int | GetTeam ()
| Returns object team.
void | SetProxyActivate (bool activate)
| Enable object activation only after you come close.
bool | GetProxyActivate ()
| Returns close activation mode.
void | SetProxyDistance (float distance)
| Sets distance for close activation.
float | GetProxyDistance ()
| Returns distance for close activation.
CBot::CBotVar * | GetBotVar ()
| Returns CBot "object" variable associated with this object.
std::string | GetTooltipText ()
| Returns tooltip text for an object.
void | SetLock (bool lock)
| Set "lock" mode of an object (for example, a robot while it's being factored, or a building while it's built).
bool | GetLock ()
| Return "lock" mode of an object.
void | SetRotationX (float angle)
void | SetRotationY (float angle)
void | SetRotationZ (float angle)
float | GetRotationX ()
float | GetRotationY ()
float | GetRotationZ ()
void | SetScaleX (float angle)
void | SetScaleY (float angle)
void | SetScaleZ (float angle)
float | GetScaleX ()
float | GetScaleY ()
float | GetScaleZ ()
Public Member Functions inherited from CInteractiveObject
| CInteractiveObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CTransportableObject
| CTransportableObject (ObjectInterfaceTypes &types)
bool | IsBeingTransported ()
| Return true if the object is currently transported.
Public Member Functions inherited from CTaskExecutorObjectImpl
| CTaskExecutorObjectImpl (ObjectInterfaceTypes &types, CObject *object)
bool | EventProcess (const Event &event)
bool | IsForegroundTask () override
| Is executing foreground task?
bool | IsBackgroundTask () override
| Is executing background task?
CForegroundTask * | GetForegroundTask () override
| Return the foreground task.
CBackgroundTask * | GetBackgroundTask () override
| Return the background task.
void | StopForegroundTask () override
| Stop foreground task.
void | StopBackgroundTask () override
| Stop background task.
Error | StartTaskTake () override
| Start a foreground task.
Error | StartTaskManip (TaskManipOrder order, TaskManipArm arm) override
Error | StartTaskFlag (TaskFlagOrder order, int rank) override
Error | StartTaskBuild (ObjectType type) override
Error | StartTaskSearch () override
Error | StartTaskDeleteMark () override
Error | StartTaskTerraform () override
Error | StartTaskRecover () override
Error | StartTaskFire (float delay) override
Error | StartTaskFireAnt (Math::Vector impact) override
Error | StartTaskSpiderExplo () override
Error | StartTaskPen (bool down, TraceColor color=TraceColor::Default) override
Error | StartTaskWait (float time) override
| Start a foreground task (scriptable tasks, not in UI).
Error | StartTaskAdvance (float length) override
Error | StartTaskTurn (float angle) override
Error | StartTaskGoto (Math::Vector pos, float altitude, TaskGotoGoal goalMode, TaskGotoCrash crashMode) override
Error | StartTaskInfo (const char *name, float value, float power, bool bSend) override
Error | StartTaskShield (TaskShieldMode mode, float delay=1000.0f) override
| Starts a background task.
Error | StartTaskGunGoal (float dirV, float dirH) override
Public Member Functions inherited from CTaskExecutorObject
| CTaskExecutorObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CProgramStorageObjectImpl
| CProgramStorageObjectImpl (ObjectInterfaceTypes &types, CObject *object)
bool | IntroduceVirus () override
void | SetActiveVirus (bool bActive) override
bool | GetActiveVirus () override
| Checks virus active status.
bool | ReadProgram (Program *program, const std::string &filename) override
| Read program from a given file.
bool | WriteProgram (Program *program, const std::string &filename) override
| Write program to a given file.
bool | GetCompile (Program *program) override
| Check if program was compiled successfully.
Program * | AddProgram () override
| Add a new program.
void | AddProgram (std::unique_ptr< Program > program) override
| Add given program to the program list stored in this robot.
void | RemoveProgram (Program *program) override
| Remove program.
Program * | CloneProgram (Program *program) override
| Clone a program.
std::vector< std::unique_ptr< Program > > & | GetPrograms () override
| Return a std::vector of all available programs.
int | GetProgramCount () override
| Return count of all programs.
Program * | GetProgram (int index) override
| Return program with the given index.
Program * | GetOrAddProgram (int index) override
| Return program at the given index (creating it and all previous ones as needed).
int | GetProgramIndex (Program *program) override
| Return index in the list of given Program instance.
void | SetProgramStorageIndex (int programStorageIndex) override
| Set index for use in filename for saved programs (-1 to disable).
int | GetProgramStorageIndex () override
| Return index that is used while saving programs.
void | SaveAllUserPrograms (const std::string &userSource) override
| Save all user programs.
void | LoadAllProgramsForLevel (CLevelParserLine *levelSource, const std::string &userSource, bool loadSoluce) override
| Load all programs when loading the level including previously saved user programs.
void | SaveAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource) override
| Save all programs when saving the saved scene.
void | LoadAllProgramsForSavedScene (CLevelParserLine *levelSourceLine, const std::string &levelSource) override
| Load all programs when loading the saved scene.
Public Member Functions inherited from CProgramStorageObject
| CProgramStorageObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CProgrammableObjectImpl
| CProgrammableObjectImpl (ObjectInterfaceTypes &types, CObject *object)
bool | EventProcess (const Event &event)
bool | IsProgram () override
| Check if a program is running.
void | RunProgram (Program *program) override
| Start a program.
Program * | GetCurrentProgram () override
| Returns the currently running program, or nullptr if no program is running.
void | StopProgram () override
| Stop currently running program.
bool | ReadStack (std::istream &istr) override
| Read current execution status from file.
bool | WriteStack (std::ostream &ostr) override
| Save current execution status to file.
void | TraceRecordStart () override
| Start recording trace.
void | TraceRecordStop () override
| Stop recording trace and generate CBot program.
bool | IsTraceRecord () override
| Returns true if trace recording is in progress.
void | SetActivity (bool activity) override
| Management of object "activity" (temporairly stops program execution, right now used only by Aliens in eggs).
bool | GetActivity () override
void | SetCmdLine (unsigned int rank, float value)
float | GetCmdLine (unsigned int rank) override
| Returns program cmdline values for an object.
std::vector< float > & | GetCmdLine ()
Public Member Functions inherited from CProgrammableObject
| CProgrammableObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CJostleableObject
| CJostleableObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CSlottedObject
| CSlottedObject (ObjectInterfaceTypes &types)
void | SetSlotContainedObjectReq (Pseudoslot pseudoslot, CObject *object)
CObject * | GetSlotContainedObjectOpt (Pseudoslot pseudoslot)
CObject * | GetSlotContainedObjectReq (Pseudoslot pseudoslot)
Public Member Functions inherited from CJetFlyingObject
| CJetFlyingObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CFlyingObject
| CFlyingObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CMovableObject
| CMovableObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CControllableObject
| CControllableObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CPowerContainerObjectImpl
| CPowerContainerObjectImpl (ObjectInterfaceTypes &types)
void | SetEnergyLevel (float level) override
| Set energy level (percentage), value in range [0..1].
float | GetEnergyLevel () override
| Get energy level (percentage), value in range [0..1].
Public Member Functions inherited from CPowerContainerObject
| CPowerContainerObject (ObjectInterfaceTypes &types)
virtual void | SetEnergy (float energy)
| Set amount of energy in the container, value in range [0..GetCapacity()].
virtual float | GetEnergy ()
| Get amount of energy in the container, value in range [0..GetCapacity()].
Public Member Functions inherited from CRangedObject
| CRangedObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CTraceDrawingObject
| CTraceDrawingObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CShieldedAutoRegenObject
| CShieldedAutoRegenObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CShieldedObject
| CShieldedObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CDestroyableObject
| CDestroyableObject (ObjectInterfaceTypes &types)
Public Member Functions inherited from CDamageableObject
| CDamageableObject (ObjectInterfaceTypes &types)

## Protected Member Functions

void | DeleteObject (bool bAll=false)
void | SetProgrammable ()
void | SetMovable (std::unique_ptr< CMotion > motion, std::unique_ptr< CPhysics > physics)
void | SetAuto (std::unique_ptr< CAuto > automat)
void | SetOption (int option)
void | SetJostlingSphere (const Math::Sphere &jostlingSphere)
bool | EventFrame (const Event &event)
void | VirusFrame (float rTime)
void | PartiFrame (float rTime)
void | InitPart (int part)
void | UpdateTotalPart ()
int | SearchDescendant (int parent, int n)
void | UpdateEnergyMapping ()
bool | UpdateTransformObject (int part, bool bForceUpdate)
bool | UpdateTransformObject ()
void | UpdateSelectParticle ()
void | TransformCrashSphere (Math::Sphere &crashSphere) override
| Transform crash sphere by object's world matrix.
void | TransformCameraCollisionSphere (Math::Sphere &collisionSphere) override
| Transform crash sphere by object's world matrix.
Protected Member Functions inherited from CObject
| CObject (int id, ObjectType type)
| Constructor only accessible to subclasses.

## Static Protected Member Functions

static bool | IsSelectableByDefault (ObjectType type)
| Check if given object type should be selectable by default.
static bool | IsBulletWallByDefault (ObjectType type)
| Check if given object type should have bulletWall enabled by default.

## Protected Attributes

Gfx::CEngine * | m_engine
Gfx::CLightManager * | m_lightMan
Gfx::CTerrain * | m_terrain
Gfx::CCamera * | m_camera
Gfx::CParticle * | m_particle
CRobotMain * | m_main
CSoundInterface * | m_sound
std::unique_ptr< CPhysics > | m_physics
std::unique_ptr< CMotion > | m_motion
std::unique_ptr< CAuto > | m_auto
std::unique_ptr< Ui::CObjectInterface > | m_objectInterface
std::string | m_name
Character | m_character
int | m_option
int | m_shadowLight
float | m_shadowHeight
Math::Vector | m_linVibration
Math::Vector | m_cirVibration
Math::Vector | m_tilt
CObject * | m_power
Math::Vector | m_powerPosition
CObject * | m_cargo
CObject * | m_transporter
int | m_transporterLink
float | m_lastEnergy
float | m_shield
float | m_range
float | m_aTime
float | m_shotTime
bool | m_bVirusMode
float | m_virusTime
float | m_lastVirusParticle
bool | m_bSelect
bool | m_bSelectable
bool | m_bCheckToken
bool | m_underground
bool | m_damaging
float | m_damageTime
DeathType | m_dying
bool | m_bFlat
bool | m_bTrainer
bool | m_bToy
bool | m_bManual
float | m_gunGoalV
float | m_gunGoalH
Gfx::CameraType | m_cameraType
bool | m_bCameraLock
float | m_magnifyDamage
Math::Sphere | m_jostlingSphere
float | m_shieldRadius
int | m_totalPart
ObjectPart | m_objectPart [OBJECTMAXPART]
int | m_partiSel [4]
EventType | m_buttonAxe
float | m_time
float | m_burnTime
float | m_reactorRange
bool | m_traceDown
TraceColor | m_traceColor
float | m_traceWidth
bool | m_bulletWall = false
bool | m_hasCargoSlot
bool | m_hasPowerSlot
Protected Attributes inherited from CObject
const int | m_id
| unique identifier
ObjectType | m_type
| object type
ObjectInterfaceTypes | m_implementedInterfaces
| interfaces that the object implements
Math::Vector | m_position
Math::Vector | m_rotation
Math::Vector | m_scale
std::vector< CrashSphere > | m_crashSpheres
| crash spheres
Math::Sphere | m_cameraCollisionSphere
bool | m_animateOnReset
bool | m_collisions
int | m_team
bool | m_proxyActivate
float | m_proxyDistance
CBot::CBotVar * | m_botVar
bool | m_lock
Protected Attributes inherited from CTaskExecutorObjectImpl
std::unique_ptr< CForegroundTask > | m_foregroundTask
std::unique_ptr< CBackgroundTask > | m_backgroundTask

## Friends

class | CObjectFactory
class | CObjectManager

## Additional Inherited Members

Public Types inherited from CSlottedObject
enum class | Pseudoslot { POWER , CARRYING }
| ! Object-independent identifiers for certain special slots More...
Static Public Member Functions inherited from CObject
static ObjectCreateParams | ReadCreateParams (CLevelParserLine *line)
| Reads params required for object creation.

## Member Function Documentation

## Simplify()

void COldObject::Simplify | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## DamageObject()

bool COldObject::DamageObject | ( | DamageType | type,
|  | float | force = std::numeric_limits< float >::infinity(),
|  | CObject * | killer = nullptr )

override virtual

Damage the object, with the given force. Returns true if the object has been fully destroyed (assuming the object is destroyable, of course). If force == infinity, destroy immediately (this is the default value).

NOTE: You should never assume that after this function exits, the object is destroyed, unless it returns true. Even if you specify force = infinity, if may still sometimes decide not to destroy the object.

Implements CDamageableObject.

## DestroyObject()

void COldObject::DestroyObject | ( | DestructionType | type,
|  | CObject * | killer = nullptr )

override virtual

Destroy the object immediately. Use this only if you are 100% sure this is what you want, because object with magnifyDamage=0 should be able to bypass all damage. It's recommended to use CDamageableObject::DamageObject() instead.

NOTE: After this function exits, you can assume the object has been definetly destroyed

Implements CDestroyableObject.

## EventProcess()

bool COldObject::EventProcess | ( | const Event & | event | ) |

override virtual

Implements CInteractiveObject.

## DeletePart()

void COldObject::DeletePart | ( | int | part | ) |

override virtual

Reimplemented from COldObjectInterface.

## GetObjectRank()

int COldObject::GetObjectRank | ( | int | part | ) |

override virtual

Reimplemented from COldObjectInterface.

## SetType()

void COldObject::SetType | ( | ObjectType | type | ) |

override virtual

Reimplemented from COldObjectInterface.

## GetOption()

int COldObject::GetOption | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## Write()

void COldObject::Write | ( | CLevelParserLine * | line | ) |

override virtual

Writes object properties to line in level file.

Implements CObject.

Reimplemented in CShielder.

## Read()

void COldObject::Read | ( | CLevelParserLine * | line | ) |

override virtual

Reads object properties from line in level file.

Implements CObject.

Reimplemented in CShielder.

## SetDrawFront()

void COldObject::SetDrawFront | ( | bool | bDraw | ) |

override virtual

Reimplemented from COldObjectInterface.

## FloorAdjust()

void COldObject::FloorAdjust | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## SetLinVibration()

void COldObject::SetLinVibration | ( | Math::Vector | dir | ) |

override virtual

Reimplemented from COldObjectInterface.

## SetCirVibration()

void COldObject::SetCirVibration | ( | Math::Vector | dir | ) |

override virtual

Reimplemented from COldObjectInterface.

## GetTilt()

Math::Vector COldObject::GetTilt | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## SetTrainer()

void COldObject::SetTrainer | ( | bool | trainer | ) |

override virtual

Disables remote control of an object (only programming allowed).

Implements CControllableObject.

## GetTrainer()

bool COldObject::GetTrainer | ( |  | ) |

override virtual

Checks if remote control is disabled.

Implements CControllableObject.

## SetMasterParticle()

void COldObject::SetMasterParticle | ( | int | part,
|  | int | parti )

override virtual

Reimplemented from COldObjectInterface.

## SetTransporter()

void COldObject::SetTransporter | ( | CObject * | transporter | ) |

override virtual

Set transporter object that transports this object.

Implements CTransportableObject.

## GetTransporter()

CObject * COldObject::GetTransporter | ( |  | ) |

override virtual

Return transported object.

Implements CTransportableObject.

## SetTransporterPart()

void COldObject::SetTransporterPart | ( | int | part | ) |

override virtual

Implements CTransportableObject.

## GetWorldMatrix()

Math::Matrix * COldObject::GetWorldMatrix | ( | int | part | ) |

override virtual

Reimplemented from COldObjectInterface.

## AdjustCamera()

void COldObject::AdjustCamera | ( | Math::Vector & | eye,
|  | float & | dirH,
|  | float & | dirV,
|  | Math::Vector & | lookat,
|  | Math::Vector & | upVec,
|  | Gfx::CameraType | type )

override virtual

Adjust camera parameters for the given object.

TODO: Seems to be for onboard camera only? Check and rename appropriately

Implements CControllableObject.

## GetCharacter()

Character * COldObject::GetCharacter | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## GetCapacity()

float COldObject::GetCapacity | ( |  | ) |

override virtual

Return capacity of this power container.

Implements CPowerContainerObject.

## IsRechargeable()

bool COldObject::IsRechargeable | ( |  | ) |

override virtual

Returns true if this power container can be recharged.

Implements CPowerContainerObject.

## SetShield()

void COldObject::SetShield | ( | float | level | ) |

override virtual

Set shield level.

Implements CShieldedObject.

## GetShield()

float COldObject::GetShield | ( |  | ) |

override virtual

Get shield level.

Implements CShieldedObject.

## SetRange()

void COldObject::SetRange | ( | float | range | ) |

override virtual

Sets jet engine heating speed (bigger = slower, 0 for infinite).

Implements CJetFlyingObject.

## GetRange()

float COldObject::GetRange | ( |  | ) |

override virtual

Returns jet engine heating speed (bigger = slower, 0 for infinite).

Implements CJetFlyingObject.

## SetReactorRange()

void COldObject::SetReactorRange | ( | float | reactorRange | ) |

override virtual

Sets current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot).

Implements CJetFlyingObject.

## GetReactorRange()

float COldObject::GetReactorRange | ( |  | ) |

override virtual

Returns current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot).

Implements CJetFlyingObject.

## SetTransparency()

void COldObject::SetTransparency | ( | float | value | ) |

override virtual

Sets the transparency of object.

Implements CObject.

## GetJostlingSphere()

Math::Sphere COldObject::GetJostlingSphere | ( |  | ) | const

override virtual

Implements CJostleableObject.

## JostleObject()

bool COldObject::JostleObject | ( | float | force | ) |

override virtual

Implements CJostleableObject.

## SetVirusMode()

void COldObject::SetVirusMode | ( | bool | bEnable | ) |

override virtual

Reimplemented from COldObjectInterface.

## GetVirusMode()

bool COldObject::GetVirusMode | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## SetCameraType()

void COldObject::SetCameraType | ( | Gfx::CameraType | type | ) |

override virtual

Set camera type for this object.

Implements CControllableObject.

## GetCameraType()

Gfx::CameraType COldObject::GetCameraType | ( |  | ) |

override virtual

Return camera type for this object.

Implements CControllableObject.

## SetCameraLock()

void COldObject::SetCameraLock | ( | bool | lock | ) |

override virtual

Disallow camera changes.

Implements CControllableObject.

## GetCameraLock()

bool COldObject::GetCameraLock | ( |  | ) |

override virtual

Check if camera changes are disallowed.

Implements CControllableObject.

## SetHighlight()

void COldObject::SetHighlight | ( | bool | highlight | ) |

override virtual

Highlights the object on mouse over.

Implements CControllableObject.

## SetSelect()

void COldObject::SetSelect | ( | bool | select,
|  | bool | bDisplayError = true )

override virtual

Selects the object.

Implements CControllableObject.

## GetSelect()

bool COldObject::GetSelect | ( |  | ) |

override virtual

Checks if the object is selected.

Implements CControllableObject.

## GetSelectable()

bool COldObject::GetSelectable | ( |  | ) |

override virtual

Returns true if the object is selectable.

Implements CControllableObject.

## SetMagnifyDamage()

void COldObject::SetMagnifyDamage | ( | float | factor | ) |

override virtual

Set damage multiplier for the object (bigger = more damage, weaker shield).

Implements CShieldedObject.

## GetMagnifyDamage()

float COldObject::GetMagnifyDamage | ( |  | ) |

override virtual

Return damage multiplier for the object (bigger = more damage, weaker shield).

Implements CShieldedObject.

## SetDamaging()

void COldObject::SetDamaging | ( | bool | damaging | ) |

override virtual

Set the status that means the object is currently taking damage.

Implements CDamageableObject.

## IsDamaging()

bool COldObject::IsDamaging | ( |  | ) |

override virtual

Is object currently taking damage?

Implements CDamageableObject.

## SetDying()

void COldObject::SetDying | ( | DeathType | deathType | ) |

override virtual

Set the status that means the object is currently dying.

Implements CDestroyableObject.

## GetDying()

DeathType COldObject::GetDying | ( |  | ) |

override virtual

Return object death type.

Implements CDestroyableObject.

## IsDying()

bool COldObject::IsDying | ( |  | ) |

override virtual

Is object currently dying?

Implements CDestroyableObject.

## GetActive()

bool COldObject::GetActive | ( |  | ) |

override virtual

Is this object active (not dead)?

Reimplemented from CObject.

## GetDetectable()

bool COldObject::GetDetectable | ( |  | ) |

override virtual

Is this object detectable (not dead and not underground)?

Reimplemented from CObject.

## GetShowLimitRadius()

float COldObject::GetShowLimitRadius | ( |  | ) |

override virtual

Return object operation radius for display after clicking UI button.

Implements CRangedObject.

## GetPhysics()

CPhysics * COldObject::GetPhysics | ( |  | ) |

override virtual

Returns CPhysics instance associated with this object. If the object implements Movable interface, and type != OBJECT_TOTO, this can be assumed to be != nullptr.

Implements CMovableObject.

## GetMotion()

CMotion * COldObject::GetMotion | ( |  | ) |

override virtual

Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr.

Implements CMovableObject.

## GetAuto()

CAuto * COldObject::GetAuto | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## FlatParent()

void COldObject::FlatParent | ( |  | ) |

override virtual

Reimplemented from COldObjectInterface.

## SetPosition()

void COldObject::SetPosition | ( | const Math::Vector & | pos | ) |

override virtual

Sets object's position.

Reimplemented from CObject.

## GetPosition()

Math::Vector COldObject::GetPosition | ( |  | ) | const

override virtual

Returns object's position.

Reimplemented from CObject.

## SetRotation()

void COldObject::SetRotation | ( | const Math::Vector & | rotation | ) |

override virtual

Sets object's rotation (Euler angles).

Angles are given in radians

Reimplemented from CObject.

## GetRotation()

Math::Vector COldObject::GetRotation | ( |  | ) | const

override virtual

Returns object's rotation (Euler angles).

Angles are given in radians

Reimplemented from CObject.

## SetScale() [1/2]

void COldObject::SetScale | ( | const Math::Vector & | scale | ) |

override virtual

Sets objects's scale.

Reimplemented from CObject.

## GetScale()

Math::Vector COldObject::GetScale | ( |  | ) | const

override virtual

Returns object's scale.

Reimplemented from CObject.

## UpdateInterface()

void COldObject::UpdateInterface | ( |  | ) |

override virtual

Updates all interface controls.

Reimplemented from CObject.

## StopProgram()

void COldObject::StopProgram | ( |  | ) |

override virtual

Stop currently running program.

Implements CProgrammableObject.

## GetTraceDown()

bool COldObject::GetTraceDown | ( |  | ) |

override virtual

Is the pencil down?

Implements CTraceDrawingObject.

## SetTraceDown()

void COldObject::SetTraceDown | ( | bool | down | ) |

override virtual

Put the drawing pencil down.

Implements CTraceDrawingObject.

## GetTraceColor()

TraceColor COldObject::GetTraceColor | ( |  | ) |

override virtual

Return color of the trace.

Implements CTraceDrawingObject.

## SetTraceColor()

void COldObject::SetTraceColor | ( | TraceColor | color | ) |

override virtual

Set color of the trace.

Implements CTraceDrawingObject.

## GetTraceWidth()

float COldObject::GetTraceWidth | ( |  | ) |

override virtual

Return trace width.

Implements CTraceDrawingObject.

## SetTraceWidth()

void COldObject::SetTraceWidth | ( | float | width | ) |

override virtual

Set trace width.

Implements CTraceDrawingObject.

## IsRepairable()

bool COldObject::IsRepairable | ( |  | ) |

override virtual

Returns true if this object can be repaired in RepairStation.

Implements CShieldedObject.

## GetShieldFullRegenTime()

float COldObject::GetShieldFullRegenTime | ( |  | ) |

override virtual

Return time (in seconds) required for full shield regeneration.

Implements CShieldedAutoRegenObject.

## GetLightningHitProbability()

float COldObject::GetLightningHitProbability | ( |  | ) |

override virtual

Returns the distance modifier for CLightning, used to modify hit probability. Value in range [0..1], where 0 is never and 1 is normal probability.

Implements CDestroyableObject.

## IsBulletWall()

bool COldObject::IsBulletWall | ( |  | ) |

override virtual

Returns true if this object can collide with bullets even though it's not damageable itself This is useful to make Barriers protect from bullets

Todo
  It will work like this for now but later I'd like to refactor this to something more manageable ~krzys_h

Reimplemented from CObject.

## MapPseudoSlot()

int COldObject::MapPseudoSlot | ( | Pseudoslot | pseudoslot | ) |

override virtual

Given one of the PSEUDOSLOT enums, returns real slot number, or -1 if specified pseudoslot is not present in this object.

Implements CSlottedObject.

## GetNumSlots()

int COldObject::GetNumSlots | ( |  | ) |

override virtual

Get number of slots. Valid slot numbers are 0 up to GetNumSlots()-1. Using invalid slot numbers in the other functions will crash the game.

Implements CSlottedObject.

## GetSlotPosition()

Math::Vector COldObject::GetSlotPosition | ( | int | slotNum | ) |

override virtual

Get relative position of a slot.

Implements CSlottedObject.

## GetSlotAngle()

float COldObject::GetSlotAngle | ( | int | slotNum | ) |

override virtual

Get relative angle (in radians) where robot should be positioned when inserting into a slot.

Implements CSlottedObject.

## GetSlotAcceptanceAngle()

float COldObject::GetSlotAcceptanceAngle | ( | int | slotNum | ) |

override virtual

Get the maximum angular distance from the ideal angle (in radians) where robot should be positioned when inserting into a slot.

Implements CSlottedObject.

## GetSlotContainedObject()

CObject * COldObject::GetSlotContainedObject | ( | int | slotNum | ) |

override virtual

Get object contained in a slot.

Implements CSlottedObject.

## SetSlotContainedObject()

void COldObject::SetSlotContainedObject | ( | int | slotNum,
|  | CObject * | object )

override virtual

Set object contained in a slot.

Implements CSlottedObject.

## TransformCrashSphere()

void COldObject::TransformCrashSphere | ( | Math::Sphere & | crashSphere | ) |

override protected virtual

Transform crash sphere by object's world matrix.

Implements CObject.

## TransformCameraCollisionSphere()

void COldObject::TransformCameraCollisionSphere | ( | Math::Sphere & | collisionSphere | ) |

override protected virtual

Transform crash sphere by object's world matrix.

Implements CObject.

## IsSelectableByDefault()

bool COldObject::IsSelectableByDefault | ( | ObjectType | type | ) |

static protected

Check if given object type should be selectable by default.

Note
  This is a default value for the selectable= parameter and can still be overriden in the scene file or using the selectinsect cheat

## IsBulletWallByDefault()

bool COldObject::IsBulletWallByDefault | ( | ObjectType | type | ) |

static protected

Check if given object type should have bulletWall enabled by default.

Note
  This is a default value for the bulletWall= parameter and can still be overriden in the scene file

## SetScale() [2/2]

void CObject::SetScale | ( | float | scale | ) |

Sets objects's scale (uniform value).

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

- src/object/old_object.h
- src/object/old_object.cpp