LINK ENTITY TO CLASS(): Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) (Cat) |
SirYodaJedi (talk | contribs) |
||
Line 26: | Line 26: | ||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:C++]] |
Revision as of 19:42, 24 April 2025
LINK_ENTITY_TO_CLASS()
is a C++ macro available in all Source and
GoldSrc games.
It is used to link a classname to a C++ class.
Syntax
In the standard Source SDK and
Half-Life SDK, the syntax is as such:
LINK_ENTITY_TO_CLASS(editor_classname, CPPClassName)
This will usually look like so:
LINK_ENTITY_TO_CLASS(info_null, CNullEntity)
ReGameDLL_CS
ReGameDLL_CS uses a modified syntax, adding an additional C++ class for server plugins:
LINK_ENTITY_TO_CLASS(editor_classname, CPPClassName, APIClassName)
This will usually look like so:
LINK_ENTITY_TO_CLASS(info_null, CNullEntity, CCSNullEntity)