Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
25 #include "client/sound/vorbis.h"
43 if (len >= MAX_QPATH) {
44 Com_Error(ERR_DROP,
"%s: oversize playerskin", __func__);
64 t = strchr(model,
'/');
66 t = strchr(model,
'\\');
76 strcpy(model,
"male");
88 if (!Q_stricmp(model,
"female")) {
89 strcpy(model,
"female");
90 strcpy(skin,
"athena");
93 strcpy(model,
"male");
94 strcpy(skin,
"grunt");
107 char model_name[MAX_QPATH];
108 char skin_name[MAX_QPATH];
109 char model_filename[MAX_QPATH];
110 char skin_filename[MAX_QPATH];
111 char weapon_filename[MAX_QPATH];
112 char icon_filename[MAX_QPATH];
117 Q_concat(model_filename,
sizeof(model_filename),
118 "players/", model_name,
"/tris.md2", NULL);
120 if (!ci->
model && Q_stricmp(model_name,
"male")) {
121 strcpy(model_name,
"male");
122 strcpy(model_filename,
"players/male/tris.md2");
127 Q_concat(skin_filename,
sizeof(skin_filename),
128 "players/", model_name,
"/", skin_name,
".pcx", NULL);
129 ci->
skin = R_RegisterSkin(skin_filename);
133 if (!ci->
skin && !Q_stricmp(model_name,
"female")) {
134 strcpy(skin_name,
"athena");
135 strcpy(skin_filename,
"players/female/athena.pcx");
136 ci->
skin = R_RegisterSkin(skin_filename);
141 if (!ci->
skin && Q_stricmp(model_name,
"male")) {
143 strcpy(model_name,
"male");
144 strcpy(model_filename,
"players/male/tris.md2");
148 Q_concat(skin_filename,
sizeof(skin_filename),
149 "players/male/", skin_name,
".pcx", NULL);
150 ci->
skin = R_RegisterSkin(skin_filename);
157 strcpy(skin_name,
"grunt");
158 strcpy(skin_filename,
"players/male/grunt.pcx");
159 ci->
skin = R_RegisterSkin(skin_filename);
164 Q_concat(weapon_filename,
sizeof(weapon_filename),
167 if (!ci->
weaponmodel[i] && !Q_stricmp(model_name,
"cyborg")) {
169 Q_concat(weapon_filename,
sizeof(weapon_filename),
176 Q_concat(icon_filename,
sizeof(icon_filename),
177 "/players/", model_name,
"/", skin_name,
"_i.pcx", NULL);
178 ci->
icon = R_RegisterPic2(icon_filename);
210 for (i = 1; i < MAX_SOUNDS; i++) {
233 if (
cl.
bsp == NULL) {
234 Com_Error(ERR_DROP,
"Couldn't load %s: %s",
241 Com_WPrintf(
"Local map version differs from demo: %i != %s\n",
244 Com_Error(ERR_DROP,
"Local map version differs from server: %i != %s",
250 for (i = 1; i < MAX_MODELS; i++) {
282 for (i = 2; i < MAX_MODELS; i++) {
287 if (name[0] !=
'#') {
313 &axis[0], &axis[1], &axis[2]) != 3) {
314 Com_DPrintf(
"Couldn't parse CS_SKYAXIS\n");
321 #if CL_RTX_SHADERBALLS
322 cvar_t* cvar_shaderballs;
323 qhandle_t cl_dev_shaderballs = -1;
350 #if CL_RTX_SHADERBALLS
351 cvar_shaderballs =
Cvar_Get(
"cl_shaderballs",
"0", 0);
352 if (cvar_shaderballs->integer &&
vid_rtx->integer)
354 cl_dev_shaderballs =
R_RegisterModel(
"develop/objects/ShaderBallArray/ShaderBallArray16.MD3");
355 if (cl_dev_shaderballs)
356 Com_Printf(
"Loaded the ShaderBalls model\n");
358 Com_WPrintf(
"Failed to load the ShaderBalls model\n");
361 cl_dev_shaderballs = -1;
364 for (i = 2; i < MAX_MODELS; i++) {
369 if (name[0] ==
'#') {
376 for (i = 1; i < MAX_IMAGES; i++) {
385 for (i = 0; i < MAX_CLIENTS; i++) {
421 if (index == CS_MAXCLIENTS) {
426 if (index == CS_AIRACCEL) {
428 cl.
pmp.airaccelerate = qtrue;
430 cl.
pmp.airaccelerate = atoi(s) ? qtrue : qfalse;
434 if (index == CS_MODELS + 1) {
435 size_t len = strlen(s);
438 Com_Error(ERR_DROP,
"%s: bad world model: %s", __func__, s);
446 if (index >= CS_LIGHTS && index < CS_LIGHTS + MAX_LIGHTSTYLES) {
447 CL_SetLightStyle(index - CS_LIGHTS, s);
456 if (index >= CS_MODELS + 2 && index < CS_MODELS + MAX_MODELS) {
457 int i = index - CS_MODELS;
467 if (index >= CS_SOUNDS && index < CS_SOUNDS + MAX_SOUNDS) {
472 if (index >= CS_IMAGES && index < CS_IMAGES + MAX_IMAGES) {
477 if (index >= CS_PLAYERSKINS && index < CS_PLAYERSKINS + MAX_CLIENTS) {
void(* R_EndRegistration)(void)
char configstrings[MAX_CONFIGSTRINGS][MAX_QPATH]
qhandle_t image_precache[MAX_IMAGES]
void(* R_SetSky)(const char *name, float rotate, vec3_t axis)
void CL_RegisterSounds(void)
struct client_static_s::@3 demo
mmodel_t * model_clip[MAX_MODELS]
qhandle_t S_RegisterSound(const char *name)
qboolean COM_IsPath(const char *s)
void CL_ParsePlayerSkin(char *name, char *model, char *skin, const char *s)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
const char * Q_ErrorString(qerror_t error)
void SCR_UpdateScreen(void)
void CL_RegisterTEntModels(void)
void CL_RegisterTEntSounds(void)
char weaponModels[MAX_CLIENTWEAPONMODELS][MAX_QPATH]
mmodel_t * BSP_InlineModel(bsp_t *bsp, const char *name)
qhandle_t sound_precache[MAX_SOUNDS]
void Com_Error(error_type_t type, const char *fmt,...)
qhandle_t R_RegisterModel(const char *name)
void CL_UpdateConfigstring(int index)
void CL_PrepRefresh(void)
qhandle_t model_draw[MAX_MODELS]
qhandle_t weaponmodel[MAX_CLIENTWEAPONMODELS]
char model_name[MAX_QPATH]
clientinfo_t baseclientinfo
clientinfo_t clientinfo[MAX_CLIENTS]
void OGG_PlayTrack(int trackNo)
void CL_RegisterVWepModels(void)
#define MAX_CLIENTWEAPONMODELS
void S_EndRegistration(void)
void(* R_BeginRegistration)(const char *map)
char skin_name[MAX_QPATH]
void CL_LoadClientinfo(clientinfo_t *ci, const char *s)
qerror_t BSP_Load(const char *name, bsp_t **bsp_p)
void CL_LoadState(load_state_t state)
size_t Q_concat(char *dest, size_t size,...)
void Con_ClearNotify_f(void)
void CL_RegisterBspModels(void)
void S_BeginRegistration(void)