CObjectTeleporter: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Placed and carried teleporters are instances of this class. | Placed and carried teleporters are instances of this class. | ||
'''Source location : /game/server/ | '''Source location : [https://github.com/sreechar/TF2-Source-Code/blob/master/tf2_src/game/server/tf/tf_obj_teleporter.h /game/server/tf/tf_obj_teleporter.h]''' | ||
'''Linked entity : obj_teleporter''' | '''Linked entity : [https://developer.valvesoftware.com/wiki/Obj_teleporter obj_teleporter]''' | ||
==[[ | ==[[Classes|Class Structure]]== | ||
*'''[[CBaseEntity]]''' | *'''[[CBaseEntity]]''' | ||
**'''[[CBaseAnimating]]''' | **'''[[CBaseAnimating]]''' | ||
Line 16: | Line 16: | ||
== SendProps == | == SendProps == | ||
{| class="wikitable sortable" style="margin: 0 auto; width: 100%; padding: 0;" | {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" | ||
|+CObjectTeleporter | |+CObjectTeleporter | ||
! style="width: 50%; background-color: #303030; color: white" |Name | ! style="width: 50%; background-color: #303030; color: white" |Name | ||
Line 24: | Line 24: | ||
|'''m_iState''' | |'''m_iState''' | ||
|Integer | |Integer | ||
|What this teleporter is currently doing | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" | |||
! colspan="1" |Values | |||
|- | |||
| | | | ||
* 0 - TELEPORTER_STATE_BUILDING // Building, not active yet | |||
* 1 - TELEPORTER_STATE_IDLE // Does not have a matching teleporter yet | |||
* 2 - TELEPORTER_STATE_READY // Found match, charged and ready | |||
* 3 - TELEPORTER_STATE_SENDING // Teleporter entrance teleporting a player away | |||
* 4 - TELEPORTER_STATE_RECEIVING // Teleporter exit receiving a teleported player, before any game events are handled | |||
* 5 - TELEPORTER_STATE_RECEIVING_RELEASE // Fired immediately after TELEPORTER_STATE_RECEIVING, this handles game events and resets some teleporter variables | |||
* 6 - TELEPORTER_STATE_RECHARGING // Waiting for recharge | |||
* 7 - TELEPORTER_STATE_UPGRADING | |||
|} | |||
|- | |- | ||
|'''m_flRechargeTime''' | |'''m_flRechargeTime''' | ||
|Float | |Float | ||
| | |The timestamp for when this teleporter will be fully charged again after sending a player | ||
|- | |- | ||
|'''m_flCurrentRechargeDuration''' | |'''m_flCurrentRechargeDuration''' | ||
|Float | |Float | ||
| | |The amount of time it takes for this teleporter to recharge | ||
|- | |- | ||
|'''m_iTimesUsed''' | |'''m_iTimesUsed''' | ||
|Integer | |Integer | ||
| | |The amount of times this teleporter has teleported a player | ||
|- | |- | ||
|'''m_flYawToExit''' | |'''m_flYawToExit''' | ||
|Float | |Float | ||
| | |For a teleporter entrance, this is the yaw angle pointing directly at the exit teleporter. This value seems to be calculated strangely however, as angle 0 begins directly down on the y axis, and the angle increments clockwise rather than counter clockwise. | ||
|- | |- | ||
|'''m_bMatchBuilding''' | |'''m_bMatchBuilding''' | ||
|Boolean | |Boolean | ||
| | | | ||
|} | |||
== Entity DataMaps == | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0; | |||
|+CObjectTeleporter | |||
! style="width: 50%; background-color: #303030; color: white" |Name | |||
! style="width: 15%; background-color: #303030; color: white" |Type | |||
! style="width: 35%; background-color: #303030; color: white" |Description | |||
|- | |||
| style="width: 50%;" |'''CObjectTeleporterTeleporterThink''' | |||
| style="width: 15%;" | | |||
| style="width: 35%;" | | |||
|- | |||
| style="width: 50%;" |'''CObjectTeleporterTeleporterTouch''' | |||
| style="width: 15%;" | | |||
| style="width: 35%;" | | |||
|- | |||
| style="width: 50%;" |'''m_iTeleportType''' | |||
| style="width: 15%;" |Integer | |||
| style="width: 35%;" |What type of teleporter this is | |||
{| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" | |||
! colspan="1" |Values | |||
|- | |||
| | |||
* 0 - TTYPE_NONE | |||
* 1 - TTYPE_ENTRANCE | |||
* 2 - TTYPE_EXIT | |||
|} | |||
|- | |||
| style="width: 50%;" |'''m_iszMatchingMapPlacedTeleporter''' | |||
| style="width: 15%;" | | |||
| style="width: 35%;" | | |||
|} | |} |
Latest revision as of 16:50, 13 November 2022
Overview[edit | edit source]
Placed and carried teleporters are instances of this class.
Source location : /game/server/tf/tf_obj_teleporter.h
Linked entity : obj_teleporter
Class Structure[edit | edit source]
- CBaseEntity
- CBaseAnimating
- CBaseAnimatingOverlay
- CBaseFlex
- CBaseCombatCharacter
- CBaseObject
- CObjectTeleporter
- CBaseObject
- CBaseCombatCharacter
- CBaseFlex
- CBaseAnimatingOverlay
- CBaseAnimating
SendProps[edit | edit source]
Name | Type | Description | ||
---|---|---|---|---|
m_iState | Integer | What this teleporter is currently doing
| ||
m_flRechargeTime | Float | The timestamp for when this teleporter will be fully charged again after sending a player | ||
m_flCurrentRechargeDuration | Float | The amount of time it takes for this teleporter to recharge | ||
m_iTimesUsed | Integer | The amount of times this teleporter has teleported a player | ||
m_flYawToExit | Float | For a teleporter entrance, this is the yaw angle pointing directly at the exit teleporter. This value seems to be calculated strangely however, as angle 0 begins directly down on the y axis, and the angle increments clockwise rather than counter clockwise. | ||
m_bMatchBuilding | Boolean |
Entity DataMaps[edit | edit source]
Name | Type | Description | ||
---|---|---|---|---|
CObjectTeleporterTeleporterThink | ||||
CObjectTeleporterTeleporterTouch | ||||
m_iTeleportType | Integer | What type of teleporter this is
| ||
m_iszMatchingMapPlacedTeleporter |