29 #include "../client.h"
30 #include "../cl_screen.h"
31 #include "../cgame/cl_game.h"
38 #include "../renderer/r_main.h"
39 #include "../renderer/r_entity.h"
57 float loadingPercent = 0;
65 loadingPercent += 10.0f;
94 loadingPercent += 100.0f / (float)max;
122 const float percent = 40.0f;
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;
165 alreadyLoadedPercent += percent /
csi.
numODs;
171 if (od->
model[0] !=
'\0') {
257 if (cl_map_displayavailablecells->
integer) {
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");
301 cl_map_displayavailablecells =
Cvar_Get(
"cl_map_displayavailablecells",
"0", 0,
"Display cells where a soldier can move");
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_AddPathing(void)
Adds a pathing marker to the current floor when we render the world.
#define VectorCopy(src, dest)
void CL_AddTargeting(void)
Adds a target cursor when we render the world.
void SCR_DrawLoading(int percent)
Draws the current loading pic of the map from base/pics/maps/loading.
renderer_threadstate_t r_threadstate
void CL_ViewPrecacheModels(void)
Precaches all models at game startup - for faster access.
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
char * CL_GetConfigString(int index)
static cvar_t * cl_precache
void SCR_DrawLoadingScreen(bool string, int percent)
Precache and loading screen at startup.
void CL_AddActorPathing(void)
Adds an actor pathing marker to the current floor when we render the world.
void CL_SpawnParseEntitystring(void)
Parse the map entity string and spawns those entities that are client-side only.
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
void LM_AddToScene(void)
Add the local models to the scene.
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 CL_ViewCenterAtGridPosition(const pos3_t pos)
Centers the camera on a given grid field.
void CL_DisplayObstructionArrows(void)
Useful for debugging pathfinding.
linkedList_t * models[NAME_LAST]
void Com_Printf(const char *const fmt,...)
model_t * LE_GetDrawModel(unsigned int index)
int CL_GetConfigStringInteger(int index)
Defines all attributes of objects used in the inventory.
static void CL_ViewCalcFieldOfViewY(const float width, const float height)
void Com_Error(int code, const char *fmt,...)
void Cmd_ExecuteString(const char *text,...)
A complete command line has been parsed, so try to execute it.
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
void CL_ParticleRegisterArt(void)
model_t * modelPool[MAX_OBJDEFS]
cvar_t * cl_map_draw_rescue_zone
model_t * model_draw[MAX_MODELS]
void GAME_InitMissionBriefing(const char *title)
void SCR_EndLoadingPlaque(void)
void R_SwitchModelMemPoolTag(void)
After all static models are loaded, switch the pool tag for these models to not free them everytime R...
#define PosToVec(p, v)
Pos boundary size is +/- 128 - to get into the positive area we add the possible max negative value a...
void CL_ViewCalcFieldOfViewX(void)
Calculates refdef's FOV_X. Should generally be called after any changes are made to the zoom level (v...
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
model_t * R_FindModel(const char *name)
Tries to load a model.
teamDef_t teamDef[MAX_TEAMDEFS]
const struct cBspModel_s * model_clip[MAX_MODELS]
void LM_Register(void)
Register misc_models.
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...
le_t * LE_GetNextInUse(le_t *lastLE)
Iterate through the entities that are in use.
static cvar_t * cl_map_displayavailablecells
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
void CL_ViewUpdateRenderData(void)
Updates the refdef.
const objDef_t * INVSH_GetItemByIDX(int index)
Returns the item that belongs to the given index or nullptr if the index is invalid.
static float CL_PrecacheCharacterModels(float alreadyLoadedPercent)
Precache all menu models for faster access.
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.
void CL_ViewLoadMedia(void)
Call before entering a new level, or after vid_restart.
void CL_DisplayFloorArrows(void)
Useful for debugging pathfinding.