CBaseObject: Difference between revisions

From SigMod
Jump to navigation Jump to search
No edit summary
No edit summary
Line 46: Line 46:
|'''m_bBuilding'''
|'''m_bBuilding'''
|Boolean
|Boolean
|
|Whether or not this object is currently under construction
|-
|-
|'''m_bPlacing'''
|'''m_bPlacing'''
|Boolean
|Boolean
|
|Whether or not this object is staged to be constructed / placed. For engineers, this means they have selected the building on their construction PDA, it is irrelevant as to whether or not they are actually allowed to place the building in the spot they are looking at. For spies, this simply means they have their sapper out, it doesn't need to be ready to place on a building
|-
|-
|'''m_bCarried'''
|'''m_bCarried'''
|Boolean
|Boolean
|
|Whether or not an engineer is carrying this building '''after''' placing it
|-
|-
|'''m_bCarryDeploy'''
|'''m_bCarryDeploy'''
Line 62: Line 62:
|'''m_bMiniBuilding'''
|'''m_bMiniBuilding'''
|Boolean
|Boolean
|
|Whether or not this object is a mini building. Changing this value to 1 will add '''Mini-''' to the beginning of the building's name, regardless of the building type. For sentries, it's advised to only change this value while the engineer is placing the sentry (m_bPlacing = 1), as changing it during other periods of time lead to different unintended consequences. (For example you cannot pick up a sentrygun that was above level 1 if you make it a mini sentry, it's model will also not update.)
|-
|-
|'''m_flPercentageConstructed'''
|'''m_flPercentageConstructed'''

Revision as of 22:51, 12 November 2022

Overview

The base class for place-able objects.

Source location : /game/shared/tf/baseobject_shared.h

Class Structure

SendProps

CBaseObject
Name Type Description
m_iHealth Integer The current health of this object
m_iMaxHealth Integer The maximum health this object can have in it's current state
m_bHasSapper Boolean Whether or not this object has a sapper on it
m_iObjectType Integer What type of object this entity is
Values
  • 0 - OBJ_DISPENSER
  • 1 - OBJ_TELEPORTER
  • 2 - OBJ_SENTRYGUN
  • 3 - OBJ_ATTACHMENT_SAPPER
m_bBuilding Boolean Whether or not this object is currently under construction
m_bPlacing Boolean Whether or not this object is staged to be constructed / placed. For engineers, this means they have selected the building on their construction PDA, it is irrelevant as to whether or not they are actually allowed to place the building in the spot they are looking at. For spies, this simply means they have their sapper out, it doesn't need to be ready to place on a building
m_bCarried Boolean Whether or not an engineer is carrying this building after placing it
m_bCarryDeploy Boolean
m_bMiniBuilding Boolean Whether or not this object is a mini building. Changing this value to 1 will add Mini- to the beginning of the building's name, regardless of the building type. For sentries, it's advised to only change this value while the engineer is placing the sentry (m_bPlacing = 1), as changing it during other periods of time lead to different unintended consequences. (For example you cannot pick up a sentrygun that was above level 1 if you make it a mini sentry, it's model will also not update.)
m_flPercentageConstructed Float
m_fObjectFlags Integer
m_hBuiltOnEntity Integer Building being sapped by sapper
m_bDisabled Boolean
m_hBuilder Integer Building owner player, take credits for actions performed by building such as sentry kills
m_vecBuildMaxs Vector
m_vecBuildMins Vector
m_iDesiredBuildRotations Integer
m_bServerOverridePlacement Boolean
m_iUpgradeLevel Integer
m_iUpgradeMetal Integer
m_iUpgradeMetalRequired Integer
m_iHighestUpgradeLevel Integer Current level, can be set to change sentry level with animation
m_iObjectMode Integer
m_bDisposableBuilding Boolean
m_bWasMapPlaced Boolean
m_bPlasmaDisable Boolean

Entity DataMaps

CBaseObject
Name Type Description
CBaseObjectUpgradeThink
InputAddHealth
InputDisable
InputEnable
InputHide
InputRemoveHealth
InputSetBuilder
InputSetHealth
InputSetSolidToPlayer
InputShow
m_OnBecomingDisabled
m_OnBecomingReenabled
m_OnDamaged
m_OnDestroyed
m_OnObjectHealthChanged
m_OnRepaired
m_SolidToPlayers
m_nDefaultUpgradeLevel