57 float loadingPercent = 0;
65 loadingPercent += 10.0f;
83 if (!
cl.model_draw[
i]) {
92 cl.model_clip[
i] =
nullptr;
94 loadingPercent += 100.0f / (float)max;
122 const float percent = 40.0f;
124 for (
int i = 0;
i <
csi.numTeamDefs;
i++) {
134 Com_Printf(
"Com_PrecacheCharacterModels: Could not register model %s\n", model);
138 Com_Printf(
"Com_PrecacheCharacterModels: Could not register model %s\n", model);
154 float percent = 30.0f;
155 float alreadyLoadedPercent = 30.0f;
158 alreadyLoadedPercent += loaded;
160 percent = 100 - alreadyLoadedPercent;
162 for (
int i = 0;
i <
csi.numODs;
i++) {
165 alreadyLoadedPercent += percent /
csi.numODs;
171 if (od->
model[0] !=
'\0') {
173 if (
cls.modelPool[
i])
193 refdef.fieldOfViewX = std::max(std::min(
FOV / zoom, 140.0), 1.0);
195 refdef.fieldOfViewX = std::max(std::min(
FOV /
cl.cam.zoom, 95.0), 55.0);
204 refdef.fieldOfViewY = atan(tan(
refdef.fieldOfViewX * (
M_PI / 360.0)) * (height / width)) * (360.0 /
M_PI);
230 refdef.FFPToShaderCount = 0;
231 refdef.shaderToShaderCount = 0;
232 refdef.shaderToFFPCount = 0;
300 cl_precache =
Cvar_Get(
"cl_precache",
"0",
CVAR_ARCHIVE,
"Precache character models at startup - more memory usage but smaller loading times in the game");
302 cl_map_draw_rescue_zone =
Cvar_Get(
"cl_map_draw_rescue_zone",
"2", 0,
"Draw rescue zone: 1 - draw perimeter, 2 - draw circles on the ground, 3 - draw both");
void CL_DisplayObstructionArrows(void)
Useful for debugging pathfinding.
void CL_AddTargeting(void)
Adds a target cursor when we render the world.
void CL_AddActorPathing(void)
Adds an actor pathing marker to the current floor when we render the world.
void CL_AddPathing(void)
Adds a pathing marker to the current floor when we render the world.
void CL_DisplayFloorArrows(void)
Useful for debugging pathfinding.
char * CL_GetConfigString(int index)
int CL_GetConfigStringInteger(int index)
void GAME_InitMissionBriefing(const char *title)
Shared game type headers.
le_t * LE_GetNextInUse(le_t *lastLE)
Iterate through the entities that are in use.
void LM_AddToScene(void)
Add the local models to the scene.
void LM_Register(void)
Register misc_models.
model_t * LE_GetDrawModel(unsigned int index)
cvar_t * cl_map_draw_rescue_zone
void CL_ParticleRegisterArt(void)
void R_SwitchModelMemPoolTag(void)
After all static models are loaded, switch the pool tag for these models to not free them everytime R...
renderer_threadstate_t r_threadstate
void R_ModBeginLoading(const char *tiles, bool day, const char *pos, const char *mapName, const char *mapZone)
Specifies the model that will be used as the world.
void SCR_DrawLoading(int percent)
Draws the current loading pic of the map from base/pics/maps/loading.
void SCR_DrawLoadingScreen(bool string, int percent)
Precache and loading screen at startup.
void SCR_EndLoadingPlaque(void)
Header for certain screen operations.
void CL_SpawnParseEntitystring(void)
Parse the map entity string and spawns those entities that are client-side only.
void CL_ViewLoadMedia(void)
Call before entering a new level, or after vid_restart.
void CL_ViewCenterAtGridPosition(const pos3_t pos)
Centers the camera on a given grid field.
void CL_ViewUpdateRenderData(void)
Updates the refdef.
void CL_ViewCalcFieldOfViewX(void)
Calculates refdef's FOV_X. Should generally be called after any changes are made to the zoom level (v...
static float CL_PrecacheCharacterModels(float alreadyLoadedPercent)
Precache all menu models for faster access.
static cvar_t * cl_precache
void CL_ViewPrecacheModels(void)
Precaches all models at game startup - for faster access.
static void CL_ViewCalcFieldOfViewY(const float width, const float height)
static cvar_t * cl_map_displayavailablecells
Primary header for client.
void Cmd_ExecuteString(const char *text,...)
A complete command line has been parsed, so try to execute it.
cBspModel_t * CM_InlineModel(const mapTiles_t *mapTiles, const char *name)
Searches all inline models and return the cBspModel_t pointer for the given modelnumber or -name.
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
void Com_Error(int code, const char *fmt,...)
void Com_Printf(const char *const fmt,...)
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
const objDef_t * INVSH_GetItemByIDX(int index)
Returns the item that belongs to the given index or nullptr if the index is invalid.
#define PosToVec(p, v)
Pos boundary size is +/- 128 - to get into the positive area we add the possible max negative value a...
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
model_t * R_FindModel(const char *name)
Tries to load a model.
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Defines all attributes of objects used in the inventory.
linkedList_t * models[NAME_LAST]
#define VectorCopy(src, dest)