Reference: Half-Life entity class hierarchy Last edited 2 months ago2024-08-09 05:27:34 UTC

This page shows the class hierarchy of the entities in Half-Life. This can provide glimpses into the workings behind the entities, and also entity aliases.

Comparing this with the entity definitions in the FGD can explain why some entities properties in it doesn't work in game, because the FGD isn't mirroring the class hierarchy exactly.

(* marks entities that aren't available in the FGD, and mostly shouldn't be placed into a map with the map editors.)
C++ CLASS NAME AND HIERARCHY                        ENTITY_CLASSNAME
=====================================================================
CBaseEntity
    CAmbientGeneric .   .   .   .   .   .   .   .   (ambient_generic)

    CBaseDelay  .   .   .   .   .   .   .   .   .   (*DelayedUse)
        CBaseAnimating
            CBaseToggle
                CBaseMonster
                    CApache .   .   .   .   .   .   (monster_apache)
                    CBarnacle   .   .   .   .   .   (monster_barnacle)
                    CBaseTurret
                        CTurret .   .   .   .   .   (monster_turret)
                        CMiniTurret .   .   .   .   (monster_miniturret)
                        CSentry .   .   .   .   .   (monster_sentry)
                    CBasePlayer .   .   .   .   .   (*player)
                    CBigMomma   .   .   .   .   .   (monster_bigmomma)
                    CBloater    .   .   .   .   .   (monster_bloater)
                    CBullsquid  .   .   .   .   .   (monster_bullchicken)
                    CCineMonster    .   .   .   .   (scripted_sequence)
                        CCineAI .   .   .   .   .   (aiscripted_sequence)
                    CControllerHeadBall .   .   .   (*controller_head_ball)
                    CControllerZapBall  .   .   .   (*controller_energy_ball)
                    CCycler
                        CGenericCycler  .   .   .   (cycler)
                        CCyclerProbe    .   .   .   (*cycler_prdroid)
                    CDeadBarney .   .   .   .   .   (monster_barney_dead)
                    CDeadHEV    .   .   .   .   .   (monster_hev_dead)
                    CDeadHGrunt .   .   .   .   .   (monster_hgrunt_dead)
                    CDeadScientist  .   .   .   .   (monster_scientist_dead)
                    CEnvExplosion   .   .   .   .   (env_explosion)
                    CFlockingFlyer  .   .   .   .   (*monster_flyer)
                    CFlockingFlyerFlock .   .   .   (monster_flyer_flock)
                    CFlyingMonster
                        CIchthyosaur    .   .   .   (monster_ichthyosaur)
                    CFurniture  .   .   .   .   .   (monster_furniture)
                    CGargantua  .   .   .   .   .   (monster_gargantua)
                    CGenericMonster .   .   .   .   (monster_generic)
                    CGman   .   .   .   .   .   .   (monster_gman)
                    CGrenade    .   .   .   .   .   (*grenade)
                        CApacheHVR  .   .   .   .   (*hvr_rocket)
                        CAirtank    .   .   .   .   (item_airtank)
                        CMortar .   .   .   .   .   (monster_mortar)
                        CSatchelCharge  .   .   .   (monster_satchel)
                        CSqueakGrenade  .   .   .   (monster_snark)
                        CTripmineGrenade    .   .   (monster_tripmine)
                        CRpgRocket  .   .   .   .   (*rpg_rocket)
                    CGunTarget  .   .   .   .   .   (func_guntarget)
                    CHAssassin  .   .   .   .   .   (monster_human_assassin)
                    CHeadCrab   .   .   .   .   .   (monster_headcrab)
                        CBabyCrab   .   .   .   .   (monster_babycrab)
                    CHGruntRepel    .   .   .   .   (monster_grunt_repel)
                    CHornet .   .   .   .   .   .   (*hornet)
                    CLeech  .   .   .   .   .   .   (monster_leech)
                    CMonstermaker   .   .   .   .   (monstermaker)
                    CNihilanth  .   .   .   .   .   (monster_nihilanth)
                    CNihilanthHVR   .   .   .   .   (nihilanth_energy_ball)
                    COsprey .   .   .   .   .   .   (monster_osprey)
                    CPlayerMonster  .   .   .   .   (monster_player)
                    CRat    .   .   .   .   .   .   (monster_rat)
                    CRoach  .   .   .   .   .   .   (monster_cockroach)
                    CSquadMonster
                        CAGrunt .   .   .   .   .   (monster_alien_grunt)
                        CController .   .   .   .   (monster_alien_controller)
                        CHGrunt .   .   .   .   .   (monster_human_grunt)
                        CHoundeye   .   .   .   .   (monster_houndeye)
                        CISlave .   .   .   .   .   (monster_alien_slave, monster_vortigaunt)
                    CTalkMonster
                        CBarney .   .   .   .   .   (monster_barney)
                        CScientist  .   .   .   .   (monster_scientist)
                            CSittingScientist   .   (monster_sitting_scientist)
                    CTentacle   .   .   .   .   .   (monster_tentacle)
                    CTentacleMaw    .   .   .   .   (*monster_tentaclemaw)
                    CTestHull   .   .   .   .   .   (*testhull)
                    CWreckage   .   .   .   .   .   (cycler_wreckage)
                    CZombie .   .   .   .   .   .   (monster_zombie)

                // CBasetoggle
                CBaseButton .   .   .   .   .   .   (func_button)
                    CRotButton  .   .   .   .   .   (func_rot_button)
                CBaseDoor   .   .   .   .   .   .   (func_door, func_water)
                    CRotDoor    .   .   .   .   .   (func_door_rotating)
                CBasePlatTrain
                    CFuncPlat   .   .   .   .   .   (func_plat)
                        CFuncPlatRot    .   .   .   (func_platrot)
                            CFuncTrackChange    .   (func_trackchange)
                                CFuncTrackAuto  .   (func_trackautochange)
                    CFuncTrain  .   .   .   .   .   (func_train)
                CBaseTrigger    .   .   .   .   .   (*trigger)
                    CChangeLevel    .   .   .   .   (trigger_changelevel)
                    CLadder .   .   .   .   .   .   (func_ladder)
                    CTriggerCDAudio .   .   .   .   (trigger_cdaudio)
                    CTriggerCounter .   .   .   .   (trigger_counter)
                    CTriggerHurt    .   .   .   .   (trigger_hurt)
                    CTriggerMonsterJump .   .   .   (trigger_monsterjump)
                    CTriggerMultiple    .   .   .   (trigger_multiple)
                        CTriggerOnce    .   .   .   (trigger_once)
                    CTriggerPush    .   .   .   .   (trigger_push)
                    CTriggerTeleport    .   .   .   (trigger_teleport)
                    CTriggerSave    .   .   .   .   (trigger_autosave)
                    CTriggerEndSection  .   .   .   (trigger_endsection)
                    CTriggerGravity .   .   .   .   (trigger_gravity)
                CFuncIllusionary    .   .   .   .   (func_illusionary)
                CFuncMortarField    .   .   .   .   (func_mortar_field)
                CMomentaryDoor  .   .   .   .   .   (momentary_door)
                CMomentaryRotButton .   .   .   .   (momentary_rot_button)
                CMultiManager   .   .   .   .   .   (multi_manager)
                CRecharge   .   .   .   .   .   .   (func_recharge)
                CScriptedSentence   .   .   .   .   (scripted_sentence)
                CWallHealth .   .   .   .   .   .   (func_healthcharger)

            //CBaseAnimating
            CBasePlayerItem
                CBasePlayerWeapon
                    CWeaponCycler   .   .   .   .   (cycler_weapon)
                    CGlock  .   .   .   .   .   .   (weapon_glock, weapon_9mmhandgun)
                    CCrowbar    .   .   .   .   .   (weapon_crowbar)
                    CPython .   .   .   .   .   .   (weapon_python, weapon_357)
                    CMP5    .   .   .   .   .   .   (weapon_mp5, weapon_9mmAR)
                    CCrossbow   .   .   .   .   .   (weapon_crossbow)
                    CShotgun    .   .   .   .   .   (weapon_shotgun)
                    CRpg    .   .   .   .   .   .   (weapon_rpg)
                    CGauss  .   .   .   .   .   .   (weapon_gauss)
                    CEgon   .   .   .   .   .   .   (weapon_egon)
                    CHgun   .   .   .   .   .   .   (weapon_hornetgun)
                    CHandGrenade    .   .   .   .   (weapon_handgrenade)
                    CSatchel    .   .   .   .   .   (weapon_satchel)
                    CTripmine   .   .   .   .   .   (weapon_tripmine)
                    CSqueak .   .   .   .   .   .   (monster_snark)

            CActAnimating
                CXenPLight  .   .   .   .   .   .   (xen_plantlight)
                CXenHair    .   .   .   .   .   .   (xen_hair)
                CXenTree    .   .   .   .   .   .   (xen_tree)
                CXenSpore
                    CXenSporeSmall  .   .   .   .   (xen_spore_small)
                    CXenSporeMed    .   .   .   .   (xen_spore_medium)
                    CXenSporeLarge  .   .   .   .   (xen_spore_large)

        // CBaseDelay
        CAutoTrigger    .   .   .   .   .   .   .   (trigger_auto)
        CBreakable  .   .   .   .   .   .   .   .   (func_breakable)
            CPushable   .   .   .   .   .   .   .   (func_pushable)
        CEnvBeverage    .   .   .   .   .   .   .   (env_beverage)
        CEnvFunnel  .   .   .   .   .   .   .   .   (env_funnel)
        CFireAndDie .   .   .   .   .   .   .   .   (*fireanddie)
        CGibShooter .   .   .   .   .   .   .   .   (gibshooter)
            CEnvShooter .   .   .   .   .   .   .   (env_shooter)
        CItemSoda   .   .   .   .   .   .   .   .   (item_sodacan)
        CTestEffect .   .   .   .   .   .   .   .   (test_effect)
        CTriggerCamera  .   .   .   .   .   .   .   (trigger_camera)
        CTriggerChangeTarget    .   .   .   .   .   (trigger_changetarget)
        CTriggerRelay   .   .   .   .   .   .   .   (trigger_relay)

    CBasePlayerAmmo
        CCrossbowAmmo   .   .   .   .   .   .   .   (ammo_crossbow)
        CEgonAmmo   .   .   .   .   .   .   .   .   (*ammo_egonclip) // unused, uses ammo_gaussclip instead
        CGaussAmmo  .   .   .   .   .   .   .   .   (ammo_gaussclip)
        CGlockAmmo  .   .   .   .   .   .   .   .   (ammo_glockclip, ammo_9mmclip)
        CMP5AmmoClip    .   .   .   .   .   .   .   (ammo_mp5clip, ammo_9mmAR)
        CMP5ChainAmmo   .   .   .   .   .   .   .   (ammo_9mmbox)
        CMP5AmmoGrenade .   .   .   .   .   .   .   (ammo_mp5grenades, ammo_ARgrenades)
        CPythonAmmo .   .   .   .   .   .   .   .   (ammo_357)
        CRpgAmmo    .   .   .   .   .   .   .   .   (ammo_rpgclip)
        CShotgunAmmo    .   .   .   .   .   .   .   (ammo_buckshot)

    CBaseSpectator

    CBeam   .   .   .   .   .   .   .   .   .   .   (*beam)
        CLightning  .   .   .   .   .   .   .   .   (env_beam, env_lightning)
            CTripBeam   .   .   .   .   .   .   .   (*trip_beam)
        CLaser  .   .   .   .   .   .   .   .   .   (env_laser)

    CBloodSplat
    CBMortar    .   .   .   .   .   .   .   .   .   (*bmortar) // big momma blob
    CBubbling   .   .   .   .   .   .   .   .   .   (env_bubbles)
    CButtonTarget   .   .   .   .   .   .   .   .   (button_target)
    CCorpse .   .   .   .   .   .   .   .   .   .   (*bodyque)
    CCrossbowBolt   .   .   .   .   .   .   .   .   (*crossbow_bolt)
    CCyclerSprite   .   .   .   .   .   .   .   .   (cycler_sprite)
    CDecal  .   .   .   .   .   .   .   .   .   .   (infodecal)
    CFrictionModifier   .   .   .   .   .   .   .   (func_friction)
    CFuncRotating   .   .   .   .   .   .   .   .   (func_rotating)

    CFuncTank
        CFuncTankGun    .   .   .   .   .   .   .   (func_tank)
        CFuncTankLaser  .   .   .   .   .   .   .   (func_tanklaser)
        CFuncTankMortar .   .   .   .   .   .   .   (func_tankmortar)
        CFuncTankRocket .   .   .   .   .   .   .   (func_tankrocket)

    CFuncTankControls   .   .   .   .   .   .   .   (func_tankcontrols)
    CFuncTrackTrain .   .   .   .   .   .   .   .   (func_tracktrain)
    CFuncTrainControls  .   .   .   .   .   .   .   (func_traincontrols)

    CFuncWall   .   .   .   .   .   .   .   .   .   (func_wall)
        CFuncConveyor   .   .   .   .   .   .   .   (func_conveyor)
        CFuncMonsterClip    .   .   .   .   .   .   (func_monsterclip)
        CFuncWallToggle .   .   .   .   .   .   .   (func_wall_toggle)

    CItem
        CHealthKit      .   .   .   .   .   .   .   (item_healthkit)
        CItemAntidote   .   .   .   .   .   .   .   (item_antidote)
        CItemBattery    .   .   .   .   .   .   .   (item_battery)
        CItemLongJump   .   .   .   .   .   .   .   (item_longjump)
        CItemSecurity   .   .   .   .   .   .   .   (item_security)
        CItemSuit   .   .   .   .   .   .   .   .   (item_suit)

    CLaserSpot  .   .   .   .   .   .   .   .   .   (*laser_spot)
    CNodeViewer .   .   .   .   .   .   .   .   .   (*node_viewer,
                                                     *node_viewer_human,
                                                     *node_viewer_fly,
                                                     *node_viewer_large)
    CNodeEnt    .   .   .   .   .   .   .   .   .   (info_node, info_node_air)
    CNullEntity .   .   .   .   .   .   .   .   .   (info_null)
    CPendulum   .   .   .   .   .   .   .   .   .   (func_pendulum)
    CPlatTrigger

    CPointEntity    .   .   .   .   .   .   .   .   (info_landmark,
                                                     info_player_start,
                                                     info_target,
                                                     info_teleport_destination)
        CBaseDMStart    .   .   .   .   .   .   .   (info_player_deathmatch)
        CBlood  .   .   .   .   .   .   .   .   .   (env_blood)
        CEnvGlobal  .   .   .   .   .   .   .   .   (env_global)
        CEnvSound   .   .   .   .   .   .   .   .   (env_sound)
        CEnvSpark   .   .   .   .   .   .   .   .   (env_spark, env_debris)
        CFade   .   .   .   .   .   .   .   .   .   (env_glow)
        CGlow   .   .   .   .   .   .   .   .   .   (env_glow)
        CInfoBM .   .   .   .   .   .   .   .   .   (info_bigmomma)
        CInfoIntermission   .   .   .   .   .   .   (info_intermission)
        CLight  .   .   .   .   .   .   .   .   .   (light, light_spot)
            CEnvLight   .   .   .   .   .   .   .   (light_environment)
        CMultiSource    .   .   .   .   .   .   .   (multisource)
        CMessage    .   .   .   .   .   .   .   .   (env_message)
        CPathCorner .   .   .   .   .   .   .   .   (path_corner)
        CPathTrack  .   .   .   .   .   .   .   .   (path_track)
        CRevertSaved    .   .   .   .   .   .   .   (player_loadsaved)
        CShake  .   .   .   .   .   .   .   .   .   (env_shake)
        CSprite .   .   .   .   .   .   .   .   .   (env_sprite)
        CStripWeapons   .   .   .   .   .   .   .   (player_weaponstrip)
        CTargetCDAudio  .   .   .   .   .   .   .   (target_cdaudio)
        CTriggerVolume  .   .   .   .   .   .   .   (trigger_transition)
        CXenHull

    CRenderFxManager    .   .   .   .   .   .   .   (env_render)

    CRuleEntity
        CRulePointEntity
            CGameCounter    .   .   .   .   .   .   (game_counter)
            CGameCounterSet .   .   .   .   .   .   (game_counter_set)
            CGameEnd    .   .   .   .   .   .   .   (game_end)
            CGameScore  .   .   .   .   .   .   .   (game_score)
            CGamePlayerHurt .   .   .   .   .   .   (game_player_hurt)
            CGamePlayerEquip    .   .   .   .   .   (game_player_equip)
            CGamePlayerTeam .   .   .   .   .   .   (game_player_team)
            CGameTeamMaster .   .   .   .   .   .   (game_team_master)
            CGameTeamSet    .   .   .   .   .   .   (game_team_set)
            CGameText   .   .   .   .   .   .   .   (game_text)
        CRuleBrushEntity
            CGamePlayerZone .   .   .   .   .   .   (game_zone_player)

    CShower .   .   .   .   .   .   .   .   .   .   (*spark_shower)
    CSmoker .   .   .   .   .   .   .   .   .   .   (env_smoker)
    CSoundEnt   .   .   .   .   .   .   .   .   .   (*soundent)
    CSpeaker    .   .   .   .   .   .   .   .   .   (speaker)
    CSpiral .   .   .   .   .   .   .   .   .   .   (*streak_spiral)
    CSprayCan
    CSquidSpit  .   .   .   .   .   .   .   .   .   (*squidspit)
    CStomp  .   .   .   .   .   .   .   .   .   .   (*garg_stomp)
    CWeaponBox  .   .   .   .   .   .   .   .   .   (weaponbox)
    CWorld  .   .   .   .   .   .   .   .   .   .   (worldspawn)
    CWorldItem  .   .   .   .   .   .   .   .   .   (world_items)
    CXenTreeTrigger .   .   .   .   .   .   .   .   (*xen_ttrigger)

1 Comment

Commented 3 weeks ago2024-09-19 07:23:08 UTC Comment #106406
NOTE TO SELF:
  • CBaseDelay::SUB_UseTargets has delay and killtarget. descendants:
    • item_airtank
    • all weapon_ entities
  • CBaseEntity::SUB_UseTargets doesn't have delay nor killtarget. descendants:
    • all other item_ entities
    • all ammo_ entities
  • CBasePlayerAmmo don't call SUB_UseTargets so both target and killtarget are useless.
Pickup target results:
  • ammo_* = none
  • item_* = target only, no delay/ killtarget
  • weapon_* and item_airtank = all of target/ delay/ killtarget

You must log in to post a comment. You can login or register a new account.