Models (C++)
Jump to navigation
Jump to search
This article is an orphan, meaning that few or no articles link to it.
You can help by adding links to this article from other relevant articles.
January 2024
You can help by adding links to this article from other relevant articles.
January 2024
There are several representations of a model in Source:
- Model index
- An integer unique to each model. Same on all clients as the server. Acquired from the return value of
PrecacheModel()
on the server and after thatCBaseEntity::GetModelIndex()
on both client and server. model_t
- A handle to an internal engine representation of a model. Can be passed to engine functions, but does nothing on its own. Shared between all instances of a model.
CStudioHdr
- A MDL file mapped to memory...but each entity has a different one? Can be queried for all sorts of data, but not modified. Despite being an engine class all source code is in the mod SDK.
ModelInstanceHandle_t
- Client-side handle to a model instance. Used by the model rendering system.