Editing
CBaseEntity
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== SendProps == {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" |+CBaseEntity ! 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 |- | colspan="3" style="padding: 0; margin: 0;" | {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" |AnimTimeMustBeFirst |- | style="width: 50%;" |'''m_flAnimTime''' | style="width: 15%;" |Integer | style="width: 35%;" |TBD |- | colspan="3" style="padding: 0 auto; margin: 0 auto;" | {| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" style="background-color: rgb(45, 62, 97)" | |} |} |- |'''m_flSimulationTime''' |Integer | |- |'''m_vecOrigin''' |Vector |The local position of this entity relative to it's parent. If this entity has no parent, the position is relative to the world origin. |- |'''m_ubInterpolationFrame''' |Integer | |- |'''m_nModelIndex''' |Short |The index for this entity's precached model. Changing this does nothing in TF2. |- | colspan="3" style="padding: 0; margin: 0;" | {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" |m_Collision |- | style="width: 50%;" |'''m_vecMinsPreScaled''' | style="width: 15%;" |Vector | style="width: 35%;" |The mins coordinate point for the Collision bounding box of this entity '''before''' any changes are made to it, such as through the modelscale keyvalue. |- |'''m_vecMaxsPreScaled''' |Vector |The maxs coordinate point for the Collision bounding box of this entity '''before''' any changes are made to it, such as through the modelscale keyvalue. |- |'''m_vecMins''' |Vector |The mins coordinate point for the Collision bounding box of this entity '''after''' any changes are made to it, such as through the modelscale keyvalue. |- |'''m_vecMaxs''' |Vector |The maxs coordinate point for the Collision bounding box of this entity '''after''' any changes are made to it, such as through the modelscale keyvalue. |- |'''m_nSolidType''' |Unsigned Char |Determines the type of collision representation for the entity's bounding volume. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L235 /public/const.h#L235] * <span style="color: #66b1fa">0</span> - Non-solid * <span style="color: #66b1fa">1</span> - A BSP tree (QPhysics) * <span style="color: #66b1fa">2</span> - Bounding Box * <span style="color: #66b1fa">3</span> - Oriented Bounding Box * <span style="color: #66b1fa">4</span> - Oriented Bounding Box constrained to only rotate along the yaw axis * <span style="color: #66b1fa">5</span> - Always call into the entity for tests * <span style="color: #66b1fa">6</span> - Solid [https://developer.valvesoftware.com/wiki/VPhysics VPhysics] object, get vcollide from the model and collide with that |} |- |'''m_usSolidFlags''' |Unsigned Short |Entity solidity bit flags. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L247 /public/const.h#L247] * <span style="color: #66b1fa">0</span> - None * <span style="color: #66b1fa">1</span> - Ignore solid type + always call into this entity for ray tests * <span style="color: #66b1fa">2</span> - Ignore solid type + always call into this entity for swept box tests * <span style="color: #66b1fa">4</span> - Are we currently not solid? * <span style="color: #66b1fa">8</span> - This is something may be collideable but fires touch functions even when it's not collideable (when the FSOLID_NOT_SOLID (4) flag is set) * <span style="color: #66b1fa">16</span> - You can't stand on this * <span style="color: #66b1fa">32</span> - Contains volumetric contents (like water) * <span style="color: #66b1fa">64</span> - Forces the collision rep to be world-aligned even if it's SOLID_BSP or SOLID_VPHYSICS * <span style="color: #66b1fa">128</span> - Uses a special trigger bounds separate from the normal OBB * <span style="color: #66b1fa">256</span> - Collisions are defined in root parent's local coordinate space * <span style="color: #66b1fa">512</span> - This trigger will touch debris objects |} |- |'''m_nSurroundType''' |Unsigned Char | |- |'''m_triggerBloat''' |Unsigned Char | |- |'''m_bUniformTriggerBloat''' |Boolean |Not in source? |- |'''m_vecSpecifiedSurroundingMinsPreScaled''' |Vector | |- |'''m_vecSpecifiedSurroundingMaxsPreScaled''' |Vector | |- |'''m_vecSpecifiedSurroundingMins''' |Vector | |- |'''m_vecSpecifiedSurroundingMaxs''' |Vector | |- | colspan="3" style="padding: 0 auto; margin: 0 auto;" | {| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" style="background-color: rgb(45, 62, 97)" | |} |} |- |'''[https://sigwiki.potato.tf/index.php/CBaseEntity.m_nRenderFX m_nRenderFX]''' |Unsigned Char |Alpha render effects enum. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L367 /public/const.h#L367] * <span style="color: #66b1fa">0</span> - None * <span style="color: #66b1fa">1</span> - Slow Pulse (varies alpha by ±16 over a period of 1.5 s) * <span style="color: #66b1fa">2</span> - Fast Pulse (varies alpha by ±16 over a period of 0.4 s) * <span style="color: #66b1fa">3</span> - Slow Wide Pulse (varies alpha by ±64 over a period of 1.5 s) * <span style="color: #66b1fa">4</span> - Fast Wide Pulse (varies alpha by ±64 over a period of 0.4 s) * <span style="color: #66b1fa">5</span> - Slow Fade Away (decreases alpha by -1 per frame, fades out over 4 s) * <span style="color: #66b1fa">6</span> - Fast Fade Away (decreases alpha by -4 per frame, fades out over 1 s) * <span style="color: #66b1fa">7</span> - Slow Become Solid (increases alpha by +1 per frame, fades in over 4 s) * <span style="color: #66b1fa">8</span> - Fast Become Solid (increases alpha by +4 per frame, fades in over 1 s) * <span style="color: #66b1fa">9</span> - Slow Strobe (transparent 0.8 s, visible 0.8 s, repeat) * <span style="color: #66b1fa">10</span> - Fast Strobe (transparent 0.2 s, visible 0.2 s, repeat) * <span style="color: #66b1fa">11</span> - Faster Strobe (transparent 0.09 s, visible 0.09 s, repeat) * <span style="color: #66b1fa">12</span> - Slow Flicker (transparent 0.18 s, visible 1.5 s, repeat) * <span style="color: #66b1fa">13</span> - Fast Flicker (transparent 0.14 s, visible 0.2 s, repeat) * <span style="color: #66b1fa">14</span> - Constant Glow ("NoDissipation;" purpose uncertain—for sprites?) * <span style="color: #66b1fa">15</span> - Distort (causes unnatural flickering and position shifting), Fade Out (instant; not very useful outside of code) * <span style="color: #66b1fa">16</span> - Hologram (Distort + "distance fade"), Fade In (instant; not very useful outside of code) * <span style="color: #66b1fa">17</span> - Scale Up ("Explode"/"scale up really big!" causes wild stretching of model parts), Fade Wider Pulse (varies alpha by ±255 over a period over a period of 0.26 s) * <span style="color: #66b1fa">18</span> - Glow Shell (purpose unclear) * <span style="color: #66b1fa">19</span> - Clamp Minimum Scale ("keep this sprite from getting very small (SPRITES only!)") * <span style="color: #66b1fa">20</span> - Environmental Rain ("for environmental rendermode, make rain") * <span style="color: #66b1fa">21</span> - Environmental Snow ("for environmental rendermode, make snow") * <span style="color: #66b1fa">22</span> - Spotlight FX ("TEST CODE for experimental spotlight") * <span style="color: #66b1fa">23</span> - Ragdoll ("HACKHACK: TEST CODE for signalling death of a ragdoll character;" ragdolls an entity but doesn't kill it) * <span style="color: #66b1fa">24</span> - Fade Wider Pulse (varies alpha by ±255 over a period of 0.26 s) |} |- |'''m_nRenderMode''' |Unsigned Char |The mode in which this entity should attempt to be rendered. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L350 /public/const.h#L350] * <span style="color: #66b1fa">0</span> - Normal * <span style="color: #66b1fa">1</span> - Color * <span style="color: #66b1fa">2</span> - Texture * <span style="color: #66b1fa">3</span> - Glow * <span style="color: #66b1fa">4</span> - Solid/Alphatest * <span style="color: #66b1fa">5</span> - Additive * <span style="color: #66b1fa">6</span> - Removed, does nothing * <span style="color: #66b1fa">7</span> - Additive Fractional Frame * <span style="color: #66b1fa">8</span> - Alpha Add * <span style="color: #66b1fa">9</span> - World Space Glow * <span style="color: #66b1fa">10</span> - Don't Render |} |- |'''m_fEffects''' |Integer |Entity effects bit flags. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L281 /public/const.h#L281] * <span style="color: #66b1fa">1</span> - Performs bone merge on client side * <span style="color: #66b1fa">2</span> - Dynamic Light centered at entity origin * <span style="color: #66b1fa">4</span> - Player flashlight * <span style="color: #66b1fa">8</span> - Don't interpolate the next frame * <span style="color: #66b1fa">16</span> - Don't cast shadows * <span style="color: #66b1fa">32</span> - Don't draw entity * <span style="color: #66b1fa">64</span> - Don't receive shadows * <span style="color: #66b1fa">128</span> - For use with EF_BONEMERGE. If this is set, then it places this ent's origin at its parent and uses the parent's bbox + the max extents of the aiment. Otherwise, it sets up the parent's bones every frame to figure out where to place the aiment, which is inefficient because it'll setup the parent's bones even if the parent is not in the PVS. * <span style="color: #66b1fa">256</span> - Blink an item so that the user notices it * <span style="color: #66b1fa">512</span> - Always assume that the parent entity is animating |} |- |'''m_clrRender''' |Integer |An integer representing the RGB render color of this entity. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" | Calculating The Value |- |RGB values can range from 0 to 255 individually, meaning the highest value can be represented by 8 bits. The integer used by this property is simply constructed from the bits of these values side by side. Starting from the right the first 8 bits (0-7) are used for blue, then the next 8 bits (8-15) are used by green, and finally the last 8 (16-23) are used by red. To convert your RGB color to an integer using this system, open the developer console in your browser by pressing F12, go to the Console tab, and type this: <pre> (red << 16) + (green << 8) + blue </pre> Where red green and blue are your RGB values, if a value is zero, you can just omit it, for example: (255 << 16) + 255 // = RGB(255, 0, 255) |} |- |'''m_iTeamNum''' |Integer |The team this entity is a part of. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | * <span style="color: #66b1fa">0</span> - None * <span style="color: #66b1fa">1</span> - Spectator * <span style="color: #66b1fa">2</span> - RED * <span style="color: #66b1fa">3</span> - BLU * <span style="color: #66b1fa">5</span> - Boss / Neutral |} |- |'''m_CollisionGroup''' |Integer |Modifies what this entity collides with. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L397 /public/const.h#L397] * <span style="color: #66b1fa">0</span> - None * <span style="color: #66b1fa">1</span> - Collides with nothing but world and static stuff * <span style="color: #66b1fa">2</span> - Same as debris, but hits triggers * <span style="color: #66b1fa">3</span> - Collides with everything except other interactive debris or debris * <span style="color: #66b1fa">4</span> - Collides with everything except interactive debris or debris * <span style="color: #66b1fa">5</span> - COLLISION_GROUP_PLAYER, * <span style="color: #66b1fa">6</span> - COLLISION_GROUP_BREAKABLE_GLASS, * <span style="color: #66b1fa">7</span> - COLLISION_GROUP_VEHICLE, * <span style="color: #66b1fa">8</span> - For HL2, same as Collision_Group_Player, for TF2, this filters out other players and CBaseObjects * <span style="color: #66b1fa">9</span> - Generic NPC group * <span style="color: #66b1fa">10</span> - For any entity inside a vehicle * <span style="color: #66b1fa">11</span> - For any weapons that need collision detection * <span style="color: #66b1fa">12</span> - Vehicle clip brush to restrict vehicle movement * <span style="color: #66b1fa">13</span> - Projectiles! * <span style="color: #66b1fa">14</span> - Blocks entities not permitted to get near moving doors * <span style="color: #66b1fa">15</span> - Doors that the player shouldn't collide with * <span style="color: #66b1fa">16</span> - Things that are dissolving are in this group * <span style="color: #66b1fa">17</span> - Nonsolid on client and server, pushaway in player code * <span style="color: #66b1fa">18</span> - Used so NPCs in scripts ignore the player. * <span style="color: #66b1fa">19</span> - Used for NPCs in scripts that should not collide with each other * <span style="color: #66b1fa">20</span> - TFCOLLISION_GROUP_SHIELD * <span style="color: #66b1fa">21</span> - TFCOLLISION_GROUP_WEAPON * <span style="color: #66b1fa">22</span> - TFCOLLISION_GROUP_GRENADE * <span style="color: #66b1fa">23</span> - TFCOLLISION_GROUP_RESOURCE_CHUNK * <span style="color: #66b1fa">24</span> - Combat objects (override for above) * <span style="color: #66b1fa">25</span> - TFCOLLISION_GROUP_OBJECT * <span style="color: #66b1fa">26</span> - TFCOLLISION_GROUP_OBJECT_SOLIDTOPLAYERMOVEMENT |} |- |'''m_flElasticity''' |Float | |- |'''m_flShadowCastDistance''' |Float | |- |'''m_hOwnerEntity''' |Handle |The owner of this entity, not to be confused with the parent (moveparent). A common example of ownership is players owning the projectiles that they fire. Some entities may not work properly if you create them without giving them an owner. |- |'''m_hEffectEntity''' |Handle |The entity which is used to affect this one. (Ignite/Dissolve) |- |'''moveparent''' |String |The immediate parent of this entity in the movement hierarchy. The targetname of the parent is used, rather than a Handle to the parent entity itsself. |- |'''m_iParentAttachment''' |Unsigned Char |The attachment point on the parent entity which this entity is held to. |- |'''movetype''' |Unsigned Char |Determines the movement behavior for this entity. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L191 /public/const.h#L191] * <span style="color: #66b1fa">0</span> - None, don't move * <span style="color: #66b1fa">1</span> - Isometric * <span style="color: #66b1fa">2</span> - Walk, player only, moving on ground * <span style="color: #66b1fa">3</span> - NPC, movement * <span style="color: #66b1fa">4</span> - Fly, no gravity * <span style="color: #66b1fa">5</span> - Fly, with gravity * <span style="color: #66b1fa">6</span> - VPhysics * <span style="color: #66b1fa">7</span> - Push * <span style="color: #66b1fa">8</span> - Noclip * <span style="color: #66b1fa">9</span> - Ladder, for players on ladders * <span style="color: #66b1fa">10</span> - Spectator * <span style="color: #66b1fa">11</span> - Custom |} |- |'''movecollide''' |Unsigned Char |Determines the collision behavior for this entity. {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="1" |Values |- | [https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/public/const.h#L213 /public/const.h#L213] * <span style="color: #66b1fa">0</span> - Default // These ones only work for MOVETYPE_FLY + MOVETYPE_FLYGRAVITY * <span style="color: #66b1fa">1</span> - Fly/Bounce (Bounces, reflects, based on elasticity of surface and object - applies friction (adjust velocity)) * <span style="color: #66b1fa">2</span> - Fly/Custom (Touch() will modify the velocity however it likes) * <span style="color: #66b1fa">3</span> - Fly/Slide (Slides along surfaces (no bounce) - applies friction (adjusts velocity)) |} |- |'''m_angRotation''' |Vector |The rotation vector of this entity relative to it's parent. If this entity has no parent the vector is relative to the world. For players only Yaw is non zero. |- |'''m_iTextureFrameIndex''' |Unsigned Char | |- | colspan="3" style="padding: 0; margin: 0;" | {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" |predictable_id |- | style="width: 50%;" |'''m_PredictableID''' | style="width: 15%;" |Integer | style="width: 35%;" | |- |'''m_bIsPlayerSimulated''' |Boolean | |- | colspan="3" style="padding: 0 auto; margin: 0 auto;" | {| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" style="background-color: rgb(45, 62, 97)" | |} |} |- |'''m_bSimulatedEveryTick''' |Boolean | |- |'''m_bAnimatedEveryTick''' |Boolean | |- |'''m_bAlternateSorting''' |Boolean | |- | colspan="3" style="padding: 0; margin: 0;" | {| class="wikitable sortable mw-collapsible mw-collapsed" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" |m_nModelIndexOverrides |- | style="width: 50%;" |'''000''' | style="width: 15%;" |Integer | style="width: 35%;" |For <code>VISION_MODE_NONE</code> |- |'''001''' |Integer |For <code>VISION_MODE_PYRO</code> |- |'''002''' |Integer |For <code>VISION_MODE_HALLOWEEN</code> |- |'''003''' |Integer |For <code>VISION_MODE_ROME</code> |- | colspan="3" style="padding: 0 auto; margin: 0 auto;" | {| class="wikitable" style="margin: 0 auto; width: 100%; padding: 0;" ! colspan="3" style="background-color: rgb(45, 62, 97)" | |} |} |}
Summary:
Please note that all contributions to SigMod are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
SigMod:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
Edit source
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information