Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

precache model

From Quake Wiki

Revision as of 15:19, 31 July 2023 by Boondorl (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

string precache_model(string modelPath)

Usage

Precaches a model so it can be used by entities within the map. Precaching must be done at map load. Models cannot be used if they haven't been precached.

Parameters

  • modelPath
The path to the model file to set. Can be a model (.mdl), sprite (.spr) or BSP (.bsp).

Return

The passed model file path. Does nothing.

Example

// Precache a model in the monster's initialization function
void monster_my_monster()
{
    precache_model("progs/mymonster.mdl");

    // ...
}