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

precache model

From Quake Wiki

string precache_model(string modelPath)

Usage[edit]

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[edit]

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

Return[edit]

The passed model file path. Does nothing.

Example[edit]

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

    // ...
}